opentelemetry.sdk.environment_variables

opentelemetry.sdk.environment_variables.OTEL_RESOURCE_ATTRIBUTES = 'OTEL_RESOURCE_ATTRIBUTES'
OTEL_RESOURCE_ATTRIBUTES

The OTEL_RESOURCE_ATTRIBUTES environment variable allows resource attributes to be passed to the SDK at process invocation. The attributes from OTEL_RESOURCE_ATTRIBUTES are merged with those passed to Resource.create, meaning OTEL_RESOURCE_ATTRIBUTES takes lower priority. Attributes should be in the format key1=value1,key2=value2. Additional details are available in the specification.

$ OTEL_RESOURCE_ATTRIBUTES="service.name=shoppingcard,will_be_overridden=foo" python - <<EOF
import pprint
from opentelemetry.sdk.resources import Resource
pprint.pprint(Resource.create({"will_be_overridden": "bar"}).attributes)
EOF
{'service.name': 'shoppingcard',
'telemetry.sdk.language': 'python',
'telemetry.sdk.name': 'opentelemetry',
'telemetry.sdk.version': '0.13.dev0',
'will_be_overridden': 'bar'}
opentelemetry.sdk.environment_variables.OTEL_LOG_LEVEL = 'OTEL_LOG_LEVEL'
OTEL_LOG_LEVEL
opentelemetry.sdk.environment_variables.OTEL_TRACES_SAMPLER = 'OTEL_TRACES_SAMPLER'
OTEL_TRACES_SAMPLER
opentelemetry.sdk.environment_variables.OTEL_TRACES_SAMPLER_ARG = 'OTEL_TRACES_SAMPLER_ARG'
OTEL_TRACES_SAMPLER_ARG
opentelemetry.sdk.environment_variables.OTEL_BSP_SCHEDULE_DELAY = 'OTEL_BSP_SCHEDULE_DELAY'
OTEL_BSP_SCHEDULE_DELAY
opentelemetry.sdk.environment_variables.OTEL_BSP_EXPORT_TIMEOUT = 'OTEL_BSP_EXPORT_TIMEOUT'
OTEL_BSP_EXPORT_TIMEOUT
opentelemetry.sdk.environment_variables.OTEL_BSP_MAX_QUEUE_SIZE = 'OTEL_BSP_MAX_QUEUE_SIZE'
OTEL_BSP_MAX_QUEUE_SIZE
opentelemetry.sdk.environment_variables.OTEL_BSP_MAX_EXPORT_BATCH_SIZE = 'OTEL_BSP_MAX_EXPORT_BATCH_SIZE'
OTEL_BSP_MAX_EXPORT_BATCH_SIZE
opentelemetry.sdk.environment_variables.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT = 'OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT'
OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT
opentelemetry.sdk.environment_variables.OTEL_SPAN_EVENT_COUNT_LIMIT = 'OTEL_SPAN_EVENT_COUNT_LIMIT'
OTEL_SPAN_EVENT_COUNT_LIMIT
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_JAEGER_AGENT_HOST = 'OTEL_EXPORTER_JAEGER_AGENT_HOST'
OTEL_EXPORTER_JAEGER_AGENT_HOST
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_JAEGER_AGENT_PORT = 'OTEL_EXPORTER_JAEGER_AGENT_PORT'
OTEL_EXPORTER_JAEGER_AGENT_PORT
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_JAEGER_ENDPOINT = 'OTEL_EXPORTER_JAEGER_ENDPOINT'
OTEL_EXPORTER_JAEGER_ENDPOINT
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_JAEGER_USER = 'OTEL_EXPORTER_JAEGER_USER'
OTEL_EXPORTER_JAEGER_USER
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_JAEGER_PASSWORD = 'OTEL_EXPORTER_JAEGER_PASSWORD'
OTEL_EXPORTER_JAEGER_PASSWORD
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_JAEGER_TIMEOUT = 'OTEL_EXPORTER_JAEGER_TIMEOUT'
OTEL_EXPORTER_JAEGER_TIMEOUT

Maximum time the Jaeger exporter will wait for each batch export, the default timeout is 10s.

opentelemetry.sdk.environment_variables.OTEL_EXPORTER_ZIPKIN_ENDPOINT = 'OTEL_EXPORTER_ZIPKIN_ENDPOINT'
OTEL_EXPORTER_ZIPKIN_ENDPOINT

Zipkin collector endpoint to which the exporter will send data. This may include a path (e.g. http://example.com:9411/api/v2/spans).

opentelemetry.sdk.environment_variables.OTEL_EXPORTER_ZIPKIN_TIMEOUT = 'OTEL_EXPORTER_ZIPKIN_TIMEOUT'
OTEL_EXPORTER_ZIPKIN_TIMEOUT

Maximum time the Zipkin exporter will wait for each batch export, the default timeout is 10s.

opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_PROTOCOL = 'OTEL_EXPORTER_OTLP_PROTOCOL'
OTEL_EXPORTER_OTLP_PROTOCOL
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_CERTIFICATE = 'OTEL_EXPORTER_OTLP_CERTIFICATE'
OTEL_EXPORTER_OTLP_CERTIFICATE
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_HEADERS = 'OTEL_EXPORTER_OTLP_HEADERS'
OTEL_EXPORTER_OTLP_HEADERS
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_COMPRESSION = 'OTEL_EXPORTER_OTLP_COMPRESSION'
OTEL_EXPORTER_OTLP_COMPRESSION

Specifies a gRPC compression method to be used in the OTLP exporters. Possible values are:

If no OTEL_EXPORTER_OTLP_*COMPRESSION environment variable is present or compression argument passed to the exporter, the default grpc.Compression.NoCompression will be used. Additional details are available in the specification.

opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_TIMEOUT = 'OTEL_EXPORTER_OTLP_TIMEOUT'
OTEL_EXPORTER_OTLP_TIMEOUT
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_ENDPOINT = 'OTEL_EXPORTER_OTLP_ENDPOINT'
OTEL_EXPORTER_OTLP_ENDPOINT
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT = 'OTEL_EXPORTER_OTLP_TRACES_ENDPOINT'
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = 'OTEL_EXPORTER_OTLP_TRACES_PROTOCOL'
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE = 'OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE'
OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_TRACES_HEADERS = 'OTEL_EXPORTER_OTLP_TRACES_HEADERS'
OTEL_EXPORTER_OTLP_TRACES_HEADERS
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_TRACES_COMPRESSION = 'OTEL_EXPORTER_OTLP_TRACES_COMPRESSION'
OTEL_EXPORTER_OTLP_TRACES_COMPRESSION

Same as OTEL_EXPORTER_OTLP_COMPRESSION but only for the span exporter. If both are present, this takes higher precendence.

opentelemetry.sdk.environment_variables.OTEL_EXPORTER_OTLP_TRACES_TIMEOUT = 'OTEL_EXPORTER_OTLP_TRACES_TIMEOUT'
OTEL_EXPORTER_OTLP_TRACES_TIMEOUT
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_JAEGER_CERTIFICATE = 'OTEL_EXPORTER_JAEGER_CERTIFICATE'
OTEL_EXPORTER_JAEGER_CERTIFICATE
opentelemetry.sdk.environment_variables.OTEL_EXPORTER_JAEGER_AGENT_SPLIT_OVERSIZED_BATCHES = 'OTEL_EXPORTER_JAEGER_AGENT_SPLIT_OVERSIZED_BATCHES'
OTEL_EXPORTER_JAEGER_AGENT_SPLIT_OVERSIZED_BATCHES
opentelemetry.sdk.environment_variables.OTEL_SERVICE_NAME = 'OTEL_SERVICE_NAME'
OTEL_SERVICE_NAME

Convenience environment variable for setting the service name resource attribute. The following two environment variables have the same effect

OTEL_SERVICE_NAME=my-python-service

OTEL_RESOURCE_ATTRIBUTES=service.name=my-python-service

If both are set, OTEL_SERVICE_NAME takes precedence.