Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • 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
    • Getting started
    • Basic terms
      • Auto-instrumentation
      • Manual instrumentation
      • HTTP communication
      • Working with databases
      • RPC calls
      • Asynchronous operations
      • Error handling
      • Retries
    • Limitations
  • Access management
  • Pricing policy
  • Terraform reference
  • Release notes

In this article:

  • How it works
  • What is covered automatically
  • Common connection settings
  • Connection by languages
  • Python
  • Java
  • Node.js
  • Limits
  1. Traces
  2. Application instrumentation
  3. Auto-instrumentation

Auto-instrumentation

Written by
Yandex Cloud
Updated at July 20, 2026
View in Markdown
  • How it works
  • What is covered automatically
  • Common connection settings
  • Connection by languages
    • Python
    • Java
    • Node.js
  • Limits

With automatic instrumentation, OpenTelemetry libraries and agents intercept calls to standard frameworks and protocols and automatically generate spans. You get a trace without writing additional code: you just need to connect the agent or library and specify the export parameters.

How it worksHow it works

Automatic instrumentation is embedded between your application and the libraries in use. Depending on the language, this works in different ways:

  • Java: The Java agent modifies bytecode as classes are loaded.
  • Python, Node.js: These tools replace calls to standard modules with wrappers that create spans.

In all cases, every intercepted call automatically creates a span with attributes under the OpenTelemetry semantic conventions: HTTP method, URL, response status, database table name, and so on.

What is covered automaticallyWhat is covered automatically

Automatic instrumentation creates spans for typical operations:

  • HTTP servers and clients: Flask, Django, Express, Spring, requests, net/http, etc.
  • Database clients: PostgreSQL, MySQL, Redis, and MongoDB.
  • Message queues: Kafka and RabbitMQ.

For a complete list of supported libraries for each language, see the OpenTelemetry instrumentation registry.

Common connection settingsCommon connection settings

Regardless of the language, to send traces to Monium Traces, specify the connection settings using environment variables:

export OTEL_EXPORTER_OTLP_PROTOCOL="grpc"
export OTEL_SERVICE_NAME=<application_name>
export OTEL_EXPORTER_OTLP_ENDPOINT="ingest.monium.yandex.cloud:443"
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Api-Key <API_key>,x-monium-project=folder__<folder_ID>"
export OTEL_RESOURCE_ATTRIBUTES="cluster=<environment>"

Where:

  • OTEL_SERVICE_NAME: Your application's name. It is used as the service.name value in the resource attributes.
  • OTEL_EXPORTER_OTLP_ENDPOINT: Monium endpoint.
  • OTEL_EXPORTER_OTLP_HEADERS: Authorization headers and project bindings. To get an API key, create a service account with the monium.traces.writer role and API key with the yc.monium.traces.write scope.
  • OTEL_RESOURCE_ATTRIBUTES: Resource attributes. cluster sets the environment. The default value is default.

Connection by languagesConnection by languages

PythonPython

  1. Install the OpenTelemetry distribution and exporter:

    pip install opentelemetry-distro opentelemetry-exporter-otlp
    
  2. Install instrumentation for the libraries your application uses:

    opentelemetry-bootstrap -a install
    

    The command will automatically detect any installed libraries, such as Flask, Django, requests, psycopg2, etc., and install the matching instrumentation packages.

  3. Run the application using the opentelemetry-instrument wrapper:

    opentelemetry-instrument python my_app.py
    

JavaJava

  1. Download the OpenTelemetry Java agent:

    curl -L -o opentelemetry-javaagent.jar \
      https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
    
  2. Run the application with the agent:

    java -javaagent:opentelemetry-javaagent.jar -jar my_app.jar
    

    The agent automatically instruments Spring, Servlet, JAX-RS, JDBC, Kafka, gRPC, and other libraries.

Node.jsNode.js

  1. Install the automatic instrumentation package:

    npm install @opentelemetry/auto-instrumentations-node
    
  2. Run the application with automatic registration:

    node --require @opentelemetry/auto-instrumentations-node/register app.js
    

LimitsLimits

Automatic instrumentation covers only those operations for which ready-to-use libraries exist. It does not create spans for:

  • Internal application business logic.
  • Custom components and protocols.
  • Operations where you need to add specific attributes.

To trace such operations, use manual instrumentation.

Was the article helpful?

Previous
Basic terms
Next
Manual instrumentation
© 2026 Direct Cursus Technology L.L.C.