[Yandex Cloud documentation](../../index.md) > [Monium](../index.md) > Data delivery > Overview

# Delivering telemetry

Monium automatically receives telemetry data from Yandex Cloud resources. You can also send telemetry data in [OpenTelemetry](https://opentelemetry.io/) format to Monium from any sources: other clouds, your own infrastructure, or applications.

This section describes how to configure the transfer of metrics, logs, and traces to Monium. You can send data directly from an application using the OpenTelemetry SDK or use a collector agent for centralized telemetry collection and routing.

## Connection setup {#connection-parameters}

To transmit telemetry to Monium:

1. Set up telemetry collection from your application in [OpenTelemetry](https://opentelemetry.io/) format.

   You can send telemetry directly from the application or via an [agent](#collectors).
     
1. [Create a service account](../../iam/operations/sa/create.md).
1. [Create an API key](../../iam/operations/authentication/manage-api-keys.md) for the service account. Select a scope depending on the type of transferred data:

   * `yc.monium.telemetry.write`: Writing all telemetry types.
   * `yc.monium.metrics.write`: Writing metrics.
   * `yc.monium.logs.write`: Writing logs.
   * `yc.monium.traces.write`: Writing traces.

1. Configure the connection as follows:

    * Endpoint: `ingest.monium.yandex.cloud:443`.
    * Protocol: `gRPC` or `HTTP`.

1. Configure data distribution across shards.

   In Monium, telemetry has this hierarchy: project → cluster → service. Data is stored in shards in _service-cluster_ pairs.

   Specify the following parameters:

   * **Project**: Provided as the `x-monium-project` header. 
   
      By default, by creating a cloud and a folder you create these two projects: `cloud__<cloud_ID>` and `folder__<folder_ID>`. You can also create your own projects to collect telemetry.
   
   * **Cluster**: Provided in `OTEL_RESOURCE_ATTRIBUTES` with the `cluster` or `deployment.name` key. This is an optional property. The default value is `default`.
   * **Service**: Provided in `OTEL_RESOURCE_ATTRIBUTES` with the `service` or `service.name` key.

   All metrics, logs, and traces in Monium have mandatory labels: `project`, `cluster`, and `service`. These labels form the shard key.
   
   When delivering telemetry in OpenTelemetry format, the values of these key attributes are assigned in the following order of priority:
   
   * Values assigned via HTTP or gRPC headers have the highest priority.
   * Then follow the values set in the resource attributes of the request body with the `cluster` and `service` keys.
   * Next are the values set in the resource attributes recommended by the OpenTelemetry semantic convention.
   * If the above-listed values are not set, the default value is used.
   
   The project name is only taken from the header. The algorithm for determining the shard key is presented in the table below.
   
   #|
   || header | resource’s own attribute | resource’s standard attribute | default value ||
   || `x-monium-project` | — | — | — ||
   || `x-monium-cluster` | `cluster` | `deployment.name` | `default` ||
   || `x-monium-service` | `service` | `service.name`, `k8s.deployment.name`, `k8s.namespace.name` | `default` ||
   |#

## Agents {#collectors}

Monium accepts telemetry from Yandex Cloud resources, other clouds, and applications in your infrastructure.

Transfer for Yandex Cloud resources is set up when you create or update a resource.

Two types of telemetry collection are available for applications:

* **OpenTelemetry SDK**: Connect the SDK to your application and set up OTLP export.
* **Automatic instrumentation**: Use agents or libraries that automatically collect telemetry from popular frameworks without modifying the code.

You can transfer data directly from the SDK or use an OTLP-compatible agent.

The agent is installed next to the application on a server, VM, or in a container. It receives telemetry and sends it to Monium. If the application sends data in a format other than OTLP, you will need an agent for conversion.

Learn more about the setup:

* [Unified Agent](../concepts/data-collection/unified-agent/index.md): Agent by Yandex (currently works with metrics only).
* [OTel Collector](opentelemetry.md): OpenTelemetry ecosystem agent.
* [Fluent Bit](fluentbit.md): Lightweight agent for log processing and sending other types of telemetry.