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
    • Getting started
    • Basic terms
      • Auto-instrumentation
      • Manual instrumentation
      • HTTP communication
      • Working with databases
      • RPC calls
      • Asynchronous operations
      • Handling errors
      • 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
  • Limitations
  1. Traces
  2. Application instrumentation
  3. Auto-instrumentation

Auto-instrumentation

Written by
Yandex Cloud
Updated at March 24, 2026
  • How it works
  • What is covered automatically
  • Common connection settings
  • Connection by languages
    • Python
    • Java
    • Node.js
  • Limitations

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
    

LimitationsLimitations

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.