Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 2.67 KB

configure.md

File metadata and controls

60 lines (41 loc) · 2.67 KB

Configuration

Configure the Elastic Distribution of OpenTelemetry Python (EDOT Python) to send data to Elastic.

Configuration method

Configuration of the OpenTelemetry SDK should be performed through the mechanisms documented on the OpenTelemetry website. EDOT Python is typically configured with OTEL_* environment variables defined by the OpenTelemetry spec. For example:

export OTEL_RESOURCE_ATTRIBUTES=service.name=<app-name>
export OTEL_EXPORTER_OTLP_ENDPOINT=https://my-deployment.apm.us-west1.gcp.cloud.es.io
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer P....l"
opentelemetry-instrument <command to start your service>

Configuration options

Because the Elastic Distribution of OpenTelemetry Python is an extension of OpenTelemetry Python, it supports both:

OpenTelemetry configuration options

EDOT Python supports all configuration options listed in the OpenTelemetry General SDK Configuration documentation and OpenTelemetry Python.

Logs

Exporting logs from the Python logging module is disabled by default and gated under a configuration environment variable:

export OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true

Differences from OpenTelemetry Python

EDOT Python uses different defaults than OpenTelemetry Python for the following configuration options:

Option EDOT Python default OpenTelemetry Python default
OTEL_EXPERIMENTAL_RESOURCE_DETECTORS process_runtime,os,otel,telemetry_distro otel
OTEL_LOGS_EXPORTER otlp no default

Configuration options that are only available in EDOT Python

ELASTIC_OTEL_ options are specific to Elastic and will always live in EDOT Python (they will not be added upstream):

Option(s) Default Description
ELASTIC_OTEL_SYSTEM_METRICS_ENABLED false When sets to true, sends system namespace metrics.