Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Monium
  • Getting started
  • Overview
    • Overview
    • OpenTelemetry SDK
    • OTel Collector
  • Access management
  • Pricing policy
  • Terraform reference
  • Release notes

In this article:

  • Setting up transfer of metrics from an app
  • Distribution of metrics across shards
  • Example of adding telemetry
  1. Data collection
  2. OTel Collector

Data transmission via OpenTelemetry Collector

Written by
Yandex Cloud
Updated at February 24, 2026
  • Setting up transfer of metrics from an app
  • Distribution of metrics across shards
  • Example of adding telemetry

OpenTelemetry Collector (OTel Collector) is an agent that collects, processes, and exports telemetry data based on the OpenTelemetry standard. You can use the OTel Collector to transfer data from your app to Monium.

Setting up transfer of metrics from an appSetting up transfer of metrics from an app

  1. Add the Monium project name to the MONIUM_PROJECT environment variable.

    The project name format is folder__{folder_id}, where folder_id is the ID of the Yandex Cloud folder containing your app.

    The folder must have the monitoring.editor role or higher assigned to it.

  2. In this folder, create a service account and API key with the yc.monitoring.manage and yc.logging.write scopes.

  3. Add the API key to the MONIUM_API_KEY environment variable.

  4. Add the OpenTelemetry SDK to your app.

  5. Install OTel Collector.

  6. In the otel-collector.yaml configuration file, configure data transfer to Monium:

    • In the x-monium-project header, specify the project name: the MONIUM_PROJECT or folder__{folder_id} variable.

    • Add to the configuration the cumulativetodeltaprocessor processor to provide monotonically increasing sums as a RATE type metric.

    • Optionally, enable zstd compression to reduce CPU consumption compared to the default gzip method.

      Example of a minimal otel-collector.yaml configuration:

      receivers:       # Configuration of input data (metrics, logs, traces)
          otlp:        # Target type: OTLP (OpenTelemetry Protocol)
          protocols:   # List of protocols the Collector will await data on:
          grpc:        # gRPC, default port 4317
          http:        # HTTP, default port 4318
      
      processors:
          cumulativetodelta:
      
      exporters:       # Receiving system parameters: Monium
          otlp/monium:
          compression: zstd
          endpoint: ingest.monium.yandex.cloud:443
          headers:
              Authorization: Api-Key ${env:MONIUM_API_KEY}
              x-monium-project: ${env:MONIUM_PROJECT}
      
      service:         # Routing of data processing in Collector
          pipelines:
          metrics:     # Transfer of metrics, you can also add traces and logs
              receivers: [ otlp ]
              processors: [ batch, cumulativetodelta ]
              exporters: [ otlp/monium ]
      
  7. Add the name of your app or service to the OTEL_SERVICE_NAME environment variable.

  8. Run the app.

  9. View the submitted metrics.

    1. Open the shard list:

      https://monium.yandex.cloud/projects/<project_name>/shards/
      

      Where <project_name> is the ${MONIUM_PROJECT} variable or the folder__{folder_id} record.

    2. Select the shard of your application or service.

Distribution of metrics across shardsDistribution of metrics across shards

Monium stores data in shards with the project, cluster, and service keys. The shard key is selected based on a priority table, with priority decreasing from left to right.

header resource attribute resource attribute constant
x-monium-project — — —
x-monium-cluster cluster deployment.name default
x-monium-service service service.name default

Example of adding telemetryExample of adding telemetry

In this example, you will add telemetry tools to the Spring Pet Clinic test app developed on the basis of the Spring Framework.

  1. Install and set up OTel Collector.

  2. Download the repository and build the app:

    git clone https://github.com/spring-projects/spring-petclinic
    cd spring-petclinic
    ./mvnw clean package
    
  3. Download the Java agent for telemetry collection:

    curl -L 'https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar' > opentelemetry-javaagent.jar
    
  4. Configure the service.name resource attribute via the OTEL_SERVICE_NAME environment variable.

  5. Run the application with the Java agent sending data to the locally installed otel-collector:

    OTEL_SERVICE_NAME=pet-clinic java -javaagent:opentelemetry-javaagent.jar -jar target/spring-petclinic-*-SNAPSHOT.jar
    
  6. View the submitted metrics in the shard at the following link:

    https://monium.yandex.cloud/projects/<project_name>/shards/<project_name>_default_pet-clinic
    

    Where <project_name> is the ${MONIUM_PROJECT} variable or the folder__{folder_id} record.

    OTel Collector transmits data within one minute.

Was the article helpful?

Previous
OpenTelemetry SDK
Next
Overview
© 2026 Direct Cursus Technology L.L.C.