Collecting telemetry
Monium automatically receives telemetry data from Yandex Cloud resources. You can also send telemetry data in OpenTelemetry
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
To transmit telemetry to Monium:
-
Set up telemetry collection from your application in OpenTelemetry
format.You can send telemetry directly from the application or via an agent.
-
Create an API key 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.
-
Configure the connection as follows:
- Endpoint:
ingest.monium.yandex.cloud:443. - Protocol:
gRPCorHTTP.
- Endpoint:
-
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-projectheader.By default, when you create a cloud and folder, two projects are created:
cloud__<cloud_ID>andfolder__<folder_ID>. You can also create your own projects to collect telemetry. -
Cluster: Provided in
OTEL_RESOURCE_ATTRIBUTESwith theclusterordeployment.namekey. This is an optional property. The default value isdefault. -
Service: Provided in
OTEL_RESOURCE_ATTRIBUTESwith theserviceorservice.namekey.
All metrics, logs, and traces in Monium have mandatory labels:
project,cluster, andservice. These labels form the shard key.When delivering telemetry in OpenTelemetry format, the values of these key attributes are determined as follows:
- Highest priority: Values set via HTTP or gRPC headers.
- Then, the values set in the resource attributes of the request body with the
clusterandservicekeys. - Then, the values set in the resource attributes recommended by the OpenTelemetry semantic convention.
- Otherwise, a default value is assigned.
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-clusterclusterdeployment.namedefaultx-monium-serviceserviceservice.name,k8s.deployment.name,k8s.namespace.namedefault -
Agents
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: Agent by Yandex.
- OTel Collector: OpenTelemetry ecosystem agent.
- Fluent Bit: A lightweight agent for log processing and forwarding other types of telemetry.