NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #840 most downloaded on PyPI
Prometheus Metric Exporter for OpenTelemetry
Last release 9 days ago
25 Sep 2026
Ships fairly regularly
a new release about every 5 weeks
Unknown
no stable releases
2 versions withdrawn
withdrawn after publishing
6 years old
56 releases · first in 2020
One column per quarter.
Fix LoggingHandler to handle LogRecord with exc_info=False
exc_info=False (#2690)opentelemetry.sdk.resources.ProcessResourceDetector that adds the 'process.runtime.{name,version,description}' resource attributes when used with the opentelemetry.sdk.resources.get_aggregated_resources API (#2660)This release includes the release candidate for metrics.
This release adds the experimental metrics API/SDK and will include the following packages:
This release adds the experimental metrics API/SDK and will include the following packages:
opentelemetry-exporter-prometheus
opentelemetry-api
opentelemetry-sdk
opentelemetry-exporter-otlp-proto-grpc
opentelemetry-exporter-otlp
opentelemetry-exporter-prometheus : add support to configure Resource attributes as metric labels
opentelemetry-exporter-prometheus: add support to configure Resource attributes as metric labels (#5122)opentelemetry-api, opentelemetry-sdk: add support for extended attribute values everywhere. (#5266)opentelemetry-sdk: wire the top-level log_level field in declarative configuration — when set, maps the OTel SeverityNumber value to a Python logging level and applies it to the opentelemetry logger so SDK internal diagnostics respect the configured severity. (#5351)opentelemetry-sdk: add the new stable AlwaysRecordSampler (#5354)opentelemetry-configuration, opentelemetry-sdk: wire top-level attribute_limits into per-signal providers via declarative config; add log_record_limits support to LoggerProvider (#5365)opentelemetry-exporter-otlp-json-http: add OTLP JSON HTTP exporter package (#5374)opentelemetry-api, opentelemetry-sdk: add enabled() support to the Logger API, SDK, and LogRecordProcessor to let instrumentation skip expensive work when logging is disabled (#5380)opentelemetry-exporter-otlp-json-file: add OTLP JSON file Docker tests (#5412)opentelemetry-configuration: wire the experimental tracer_configurator/development, meter_configurator/development and logger_configurator/development fields into create_tracer_provider, create_meter_provider and create_logger_provider, so per-instrumentation-scope enabled overrides declared in the config file are applied to the provider (previously these fields were parsed but silently discarded). The logger minimum_severity/trace_based fields are not supported by the Python SDK and are ignored with a warning. (#5418)docs/examples: add example on how to manually setup the SDK to get SDK metrics (#5449)opentelemetry-docker-tests: add Prometheus exporter docker tests (#5457)opentelemetry-sdk: count records dropped after shutdown on otel.sdk.processor.{span,log}.processed with error.type=already_shutdown (batch span/log and simple log processors), which the semantic conventions define as a valid value for this metric. (#5509)opentelemetry-semantic-conventions: update semantic conventions to v1.44.0 (#5511)opentelemetry-sdk: add host.id to the host resource detector (#5653)opentelemetry-test-utils: add CapturingSampler to record what samplers receive in instrumentation tests (#5681)PIE (flake8-pie) ruff rule and fix all violations (#5150)opentelemetry.util.types.AttributeValue type in package opentelemetry-api is being expanded to include None, heterogeneous sequences of primitive types (and nested sequences) as opposed to only homogeneous primitive sequences, and Mappings of strings to any primitive types or sequences/mappings (which themselves must only contain primitive types or sequences/mappings validated the same way). If a bytes type is set as an attribute value in the SDK, it will no longer be utf-8 decoded to a string, instead it will be passed along as is in accordance with the OTEL spec, since bytes is a valid type in the OTLP proto. (#5266)opentelemetry-exporter-otlp-proto-http: add a max_request_size argument to the OTLP HTTP exporters (traces, logs, metrics); serialized requests larger than the limit are dropped before sending, measured before compression. Defaults to 64 MiB (enabled); set to 0 to disable. Mirrors opentelemetry-go#8157. (#5369)opentelemetry-api: subclasses of Logger need to implement the enabled method (#5380)opentelemetry-exporter-otlp-proto-http: refactor to use shared opentelemetry-exporter-otlp-common and opentelemetry-exporter-http-transport packages and switch default HTTP backend to urllib3 (#5389)opentelemetry-sdk: unify logging force_flush timeout defaults to 30000ms (#5438)opentelemetry-python: enable Ruff default ruleset and fix auto-fixable lint issues (#5491)opentelemetry-sdk: SimpleSpanProcessor now drops spans ended after shutdown() instead of passing them to the exporter, and counts them on otel.sdk.processor.span.processed with error.type=already_shutdown. (#5512)opentelemetry-exporter-otlp-proto-http: clarify that the endpoint= kwarg requires the full signal path (#5633)opentelemetry-sdk: fix typos in SpanLimits docstring (#5658)opentelemetry-configuration: perform environment variable substitution on scalar values after parsing the configuration file, so ${VAR} references inside comments and mapping keys are no longer substituted and undefined references in comments no longer abort loading (#5407)opentelemetry-configuration: declarative config environment variable substitution now replaces an unset variable that has no default with an empty value instead of raising an error, per the configuration spec. Resource attributes whose value resolves to null (an unset ${VAR} with no default) are skipped with a warning instead of being inserted as a null value. (#5408): add opentelemetry-configurationandopentelemetry-proto-json` to the package to release (#5425)opentelemetry-sdk: fix View instrument-name matching so a view configured with an instrument's real (mixed-case) name is applied; matching is now case-insensitive and platform-independent instead of relying on fnmatch's OS-dependent case handling (#5430)opentelemetry-sdk: fix missing f-prefix in exponential histogram error messages (#5434)opentelemetry-configuration: resolve false-positive warning logs for newer schema minor version (#5436)opentelemetry-sdk: make methods on FixedSizeExemplarReservoirABC thread safe (#5437)opentelemetry-propagator-jaeger: fix typing issues and enable pyright typechecking for the package opentelemetry-propagator-jaeger: skip uberctx- baggage headers with an empty value on extraction instead of raising TypeError (#5440)opentelemetry-sdk: fix TypeError when instantiating a _BaseConfigurator subclass whose __init__ takes arguments (#5441)opentelemetry-sdk: fix TypeError in os.fork() when a BatchProcessor or PeriodicExportingMetricReader is garbage collected (#5453)opentelemetry-configuration: a declarative config key present with an empty (null) value on an object-typed node (e.g. always_on:, a - service: detector, or a metric console: exporter) is now treated the same as an explicit empty config (always_on: {}) instead of failing type dispatch or silently skipping the node. Both dict-typed nodes and dataclasses constructible with no arguments are covered. (#5454)opentelemetry-api: fix copy-pasted log message in SpanContext.__delattr__ (#5455)opentelemetry-sdk: reject views with ExponentialBucketHistogramAggregation for asynchronous instruments instead of silently producing no data (#5461)opentelemetry-sdk: fill every bucket of SimpleFixedSizeExemplarReservoir before random sampling (#5462)opentelemetry-sdk: Import code_attributes from stable semconv package (#5465)opentelemetry-sdk: for both the simple and batch span/log processors, count otel.sdk.processor.{span,log}.processed when the processor submits records to the exporter instead of after export completes, and stop stamping exporter failures onto this metric as error.type (#5472)opentelemetry-sdk: fix misleading instrument name validation error message (name max length is 255, not 63). (#5513)opentelemetry-configuration: add missing process executable name to default service name when available in resource attributes (#5534)opentelemetry-sdk: fix values for process.executable.name and process.executable.path to match semantic conventions. (#5535)opentelemetry-api: fix TraceState.update dropping all entries when adding a new key at the 32-key limit (#5543)opentelemetry-sdk: bound get_aggregated_resources() wait to the timeout (#5545)opentelemetry-sdk: don't read process.executable.name resource attribute when building default service.name (#5547)opentelemetry-propagator-jaeger: enforce baggage limits on both uberctx- extract and inject, borrowing the same limits (180 entries, 4096 bytes per entry, 8192 bytes total) the package's core W3CBaggagePropagator already uses, so neither an inbound carrier nor an in-process baggage map can produce unbounded work or headers. (#5556)opentelemetry-sdk: keep metric attribute values that Python considers equal but the data model does not, such as True, 1 and 1.0, in separate metric streams (#5573)opentelemetry-sdk: keep Resource hashable and serialisable when an attribute value is bytes, instead of raising TypeError from every OTLP encoder (#5577)opentelemetry-sdk: fix instrumentation scope name matching in the tracer, meter and logger configurators so it is case-sensitive on every platform instead of relying on fnmatch's OS-dependent case handling (#5584)opentelemetry-sdk: fix TracerProvider() raising ValueError when OTEL_TRACES_SAMPLER_ARG is a syntactically valid number outside the [0.0, 1.0] range, instead of logging a warning and falling back like other invalid values (#5594)opentelemetry-sdk: retain values from synchronous instruments using last-value aggregation across cumulative collections (#5637)opentelemetry-api: Added guard for negative value on max_value_len (#5647)opentelemetry-sdk: fix overriding of the service.instance.id which has been populated from the user provided values through the resource detectors (#5660)opentelemetry-exporter-otlp-proto-grpc: Fix incorrect default port for OTLP gRPC exporter self-metrics (#5668)opentelemetry-api: update W3CBaggagePropagator to properly handle whitespace (#5680)…object before buffering. This is a potentially breaking change for custom log exporters that access context from the exported ReadableLogRecord , as t…
opentelemetry-docker-tests: Refactor Docker tests to properly validate contents of exported telemetry (#5220)opentelemetry-exporter-otlp-common: add shared package for common OTLP utilities (#5252)opentelemetry-sdk: add MissingDependencyError exception for declarative configuration and use it for missing optional dependency errors (#5265)opentelemetry-sdk: Add ability to refresh process dependent Resource attributes (#5280)opentelemetry-sdk: add force_flush method to LogRecordExporter ABC (#5294)opentelemetry-sdk: Make it possible to limit the size of stored spans in InMemorySpanExporter (#5296)opentelemetry-sdk: add log record limits environment variables OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT and OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT (#5300)opentelemetry-sdk: add support for file exporter with declarative config (#5311)opentelemetry-sdk: expose SynchronousMultiLogRecordProcessor and ConcurrentMultiLogRecordProcessor publicly (#5327)opentelemetry-sdk: point the declarative configuration package README at the shared language support status matrix in the opentelemetry-configuration repo, so Python conformance status lives alongside the other languages instead of being duplicated per language SDK. (#5347)opentelemetry-sdk: document that Python-implementation extensions (OTEL_PYTHON_* variables) are bypassed when OTEL_CONFIG_FILE is set. The env-var initialisation path is skipped entirely in favour of the declarative file; honouring these alongside a config file is tracked as a follow-up. (#5353)opentelemetry-sdk: wire id_generator from declarative configuration to TracerProvider (#5363)opentelemetry-sdk: Add support for activating instrumentors from a declarative configuration file via the instrumentation/development.python section. Instrumentors can declare a configuration attribute to have their options validated through the same type-coercion pipeline used for SDK component configuration. (#5372)opentelemetry-sdk: add record_min_max option to ExponentialBucketHistogramAggregation, matching the option already available on ExplicitBucketHistogramAggregation and required by the specification (#5377)opentelemetry-instrumentation-logging (#5344)opentelemetry-sdk: bump declarative configuration schema to v1.1.0 (#5345)opentelemetry-configuration: declarative configuration moves from opentelemetry.sdk._configuration into the new public opentelemetry-configuration package (opentelemetry.configuration namespace), published experimentally. opentelemetry-sdk[file-configuration] continues to work as an alias that installs opentelemetry-configuration alongside the SDK. (#5356)opentelemetry-api: remove env carrier environment snapshot caching, you now have to pass explicitly the mapping where to get the environment variables from as the EnvironmentGetter.get first argument. (#5366)opentelemetry-semantic-conventions: bump to 1.42.0 (#5410)opentelemetry-semantic-conventions: bump to 1.43.0 (#5413)opentelemetry-api, opentelemetry-sdk: Removed deprecated Events API/SDK. Use LogRecord with the event_name field set instead. (#5293)opentelemetry-sdk: Optimize LogRecord memory in BatchLogRecordProcessor by clearing the Context object before buffering. This is a potentially breaking change for custom log exporters that access context from the exported ReadableLogRecord, as the context will now be an empty Context() instead of the original. (#4977)opentelemetry-sdk: drop non-finite measurements (NaN and Inf) at the instrument level to prevent permanent aggregation poisoning (#5336)opentelemetry-sdk: raise ValueError when ExplicitBucketHistogramAggregation boundaries are not strictly increasing or finite (#5340)opentelemetry-sdk: ProcessResourceDetector no longer collects or emits process.command_args and process.command_line by default since the values are not sanitized and may contain sensitive information. Users who depend on these resource attributes must pass include_command_args=True. (#5364)opentelemetry-exporter-otlp-proto-http: fix the OTLP HTTP metric exporter self-observability metrics over-counting data points when max_export_batch_size splits a batch; each split now reports its own data-point count instead of the whole-batch count. (#5370)opentelemetry-api: Prevent in-place mutation of Context via inherited dict methods (#5399)Remove typing aliases deprecated in python 3.9 and replace all usages of typing.Union and typing.Optional with | .
opentelemetry-sdk: add add_metric_reader / remove_metric_reader public APIs to register / unregister metric readers at runtime. (#4863)opentelemetry-exporter-prometheus: add support for configuring metric scope labels (#5123)opentelemetry-exporter-otlp-proto-grpc: Add grpc error details to the log message that's written when the grpc call fails. (#5143)opentelemetry-exporter-http-transport: add 'opentelemetry-exporter-http-transport' package for HTTP exporters (#5194)opentelemetry-sdk: Add composite/development samplers support to declarative file configuration (#5201)opentelemetry-exporter-otlp-json-file: Add OTLP JSON File exporter implementation (#5207)opentelemetry-sdk: add _resolve_component shared utility for declarative config plugin loading, reducing boilerplate in exporter factory functions (#5215)opentelemetry-sdk: add pull metric reader support to declarative file configuration, including Prometheus metric reader via the prometheus_development config field (#5216)opentelemetry-proto-json: update to use opentelemetry-proto v1.10.0 (#5224)opentelemetry-proto: bump maximum supported protobuf version to 7.x.x (#5251)opentelemetry-sdk: add ServiceInstanceIdResourceDetector for populating service.instance.id (#5259)opentelemetry-sdk: declarative config loader now recursively converts parsed dicts into typed dataclass instances, including nested dataclasses, lists of dataclasses, and enum values. End-to-end YAML/JSON → SDK configuration now works via the factory functions. (#5269)opentelemetry-sdk: add configure_sdk(config) to the declarative configuration API. Single entry point that takes a parsed OpenTelemetryConfiguration, builds the resource, and applies the tracer/meter/logger providers and propagator globally. Honors the top-level disabled flag. (#5270)opentelemetry-sdk: the SDK configurator now honors the OTEL_CONFIG_FILE environment variable. When set, the SDK loads and applies the referenced declarative configuration file (YAML or JSON) in place of the env-var-based init path. (#5271)opentelemetry-sdk: update declarative config to use ServiceInstanceIdResourceDetector (#5299)opentelemetry-exporter-otlp-proto-common, opentelemetry-exporter-otlp-json-common: encoders now always accept null, and encode it as an empty AnyValue in accordance with the spec. (#5305)opentelemetry-sdk: validate the declarative config file_format version — reject an unsupported major version and warn on a newer minor version, per the configuration spec versioning rules (#5315)opentelemetry-exporter-http-transport: enable entry-point loading of transport implementations (#5320)opentelemetry-sdk: introduce experimental entry points for OpAMP agent integration (#4646)opentelemetry-api: conditionally import entrypoints for opentelemetry_context only if the OTEL_PYTHON_CONTEXT env variable is defined, return ContextVarsRuntimeContext otherwise (#5144)opentelemetry-sdk: rename "known/unknown" to "built-in/user-defined" terminology in declarative config component loading code (#5214)opentelemetry-proto: regenerate protobuf code from opentelemetry-proto v1.10.0 (#5223)opentelemetry-sdk: remove unnecessary copy in Span creation (#5272)opentelemetry-sdk: inline the method _clean_attribute_value (#5275)typing.Union and typing.Optional with |. (#5277)opentelemetry-api: update EnvironmentGetter to ignore non-normalized environment variable names (#5289)opentelemetry-api: normalize empty environment propagation names to _ in EnvironmentSetter and EnvironmentGetter (#5328).rst files to Sphinx documentation build for SDK logs, propagators, and exporter submodules. (#5017)opentelemetry-api: fix SelectableGroups deprecation warning (#5250)opentelemetry-sdk: make SynchronousMeasurementConsumer.consume_measurement lock free to avoid deadlocks (#5321)This is a patch release on the previous 1.42.0/0.63b0 release, fixing the issue(s) below.
This is a patch release on the previous 1.42.0/0.63b0 release, fixing the issue(s) below.
opentelemetry-api , opentelemetry-sdk : add support for 'random-trace-id' flags in W3C traceparent header trace flags. Implementations of IdGenerator
opentelemetry-api, opentelemetry-sdk: add support for 'random-trace-id' flags in W3C traceparent header trace flags. Implementations of IdGenerator that do randomly generate the 56 least significant bits, should also implement a is_trace_id_random methods that returns True. (#4854)opentelemetry-exporter-otlp-proto-grpc: make retryable gRPC error codes configurable for gRPC exporters (#4917)opentelemetry-sdk: Add create_logger_provider/configure_logger_provider to declarative file configuration, enabling LoggerProvider instantiation from config files without reading env vars (#4990)opentelemetry-exporter-otlp-json-common: add 'opentelemetry-exporter-otlp-json-common' package for OTLP JSON exporters (#4996)opentelemetry-sdk: Add service resource detector support to declarative file configuration via detection_development.detectors[].service (#5003)opentelemetry-docker-tests: add docker-tests coverage of opentelemetry-exporter-otlp-proto-grpc and opentelemetry-exporter-otlp-proto-http metrics export (#5030)registry keyword argument to PrometheusMetricReader to allow passing a custom Prometheus registry (#5055)opentelemetry-sdk: add load_entry_point shared utility to declarative file configuration for loading plugins via entry points; refactor propagator loading to use it (#5093)opentelemetry-sdk: add sampler plugin loading to declarative file configuration via the opentelemetry_sampler entry point group, matching the spec's PluginComponentProvider mechanism (#5095)opentelemetry-sdk: add propagator plugin loading to declarative file configuration via the opentelemetry_propagator entry point group, matching the spec's PluginComponentProvider mechanism (#5098)opentelemetry-sdk: add exporter plugin loading to declarative file configuration for all three signals (traces, metrics, logs) via the opentelemetry_*_exporter entry point groups, matching the spec's PluginComponentProvider mechanism (#5128)opentelemetry-sdk: add generic resource detector plugin loading to declarative file configuration via the opentelemetry_resource_detector entry point group, matching the spec's PluginComponentProvider mechanism (#5129)opentelemetry-sdk: add additional_properties support to generated config models via custom datamodel-codegen template, enabling plugin/custom component names to flow through typed dataclasses (#5131)OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED environment variable. (#5151)opentelemetry-semantic-conventions: use X | Y union annotation (#5096)opentelemetry-api: update EnvironmentGetter and EnvironmentSetter to use normalized environment variable names (#5119)UP ruff rule (#5133)opentelemetry-sdk: only load entrypoints for resource detectors if they are configured via OTEL_EXPERIMENTAL_RESOURCE_DETECTORS (#5145)scripts/tracecontext-integration-test.sh (#5149)opentelemetry-semantic-conventions: Bump semantic conventions to 1.41.1, this changes the metrics name of K8S_CONTAINER_CPU_LIMIT_UTILIZATION and K8S_CONTAINER_CPU_REQUEST_UTILIZATION. (#5200)opentelemetry-api: remove third-party importlib-metadata in favor of standard library since Python >= 3.10 is now required (#3234)opentelemetry-sdk: Allow declarative OTLP HTTP exporters to map compression: deflate instead of rejecting it as unsupported. (#5075)create_tracer() docstring (#5077)opentelemetry-sdk: Fix ProcessResourceDetector to use sys.orig_argv so that process.command, process.command_line, and process.command_args reflect the original invocation for python -m <module> runs (where sys.argv[0] is rewritten to the module path) (#5083)opentelemetry-sdk: fix YAML structure injection via environment variable substitution in declarative file configuration; values containing newlines are now emitted as quoted YAML scalars per spec requirement (#5091)opentelemetry-sdk: Fix mutable attributes reference in metrics, attributes passed to instrument add/record are now copied so that subsequent mutations do not affect recorded data points (#5106)opentelemetry-sdk: make resource detector ordering deterministic (#5120)detectors parameter of get_aggregated_resources (#5135)opentelemetry-api: Enforce W3C Baggage size limits on outbound propagation in W3CBaggagePropagator.inject(). Previously only inbound extraction enforced limits; now inject also caps entries at 180, individual pairs at 4096 bytes, and total header at 8192 bytes per the W3C Baggage spec. The extract path max_pairs limit now counts all size-valid entries rather than only successfully parsed ones. (#5163)opentelemetry-sdk: fix multi-processor force_flush skipping remaining processors when one returns None (#5179)opentelemetry-test-utils: fix weaver live check hanging when weaver log output fills the pipe buffer (#5208)This is a patch release on the previous 1.41.0/0.62b0 release, fixing the issue(s) below.
This is a patch release on the previous 1.41.0/0.62b0 release, fixing the issue(s) below.
opentelemetry-sdk : Add host resource detector support to declarative file configuration via detection_development.detectors[].host
opentelemetry-sdk: Add host resource detector support to declarative file configuration via detection_development.detectors[].host (#5002)opentelemetry-sdk: Add container resource detector support to declarative file configuration via detection_development.detectors[].container, using entry point loading of the opentelemetry-resource-detector-containerid contrib package (#5004)opentelemetry-sdk: Add create_tracer_provider/configure_tracer_provider to declarative file configuration, enabling TracerProvider instantiation from config files without reading env vars (#4985)opentelemetry-sdk: Fix AttributeError in ExplicitBucketHistogramAggregation when applied to non-Histogram instruments without explicit boundaries (#5034)BatchLogRecordProcessor default schedule_delay_millis from 5000ms to 1000ms to comply with the OTel specification. Note: logs may be exported 5x more frequently by default (e.g. for users who don't explicitly set the OTEL_BLRP_SCHEDULE_DELAY env var). (#4998)opentelemetry-sdk: Add process resource detector support to declarative file configuration via detection_development.detectors[].process (#5001)opentelemetry-sdk: Add shared _parse_headers helper for declarative config OTLP exporters (#5021)opentelemetry-api: Replace a broad exception in attribute cleaning tests to satisfy pylint in the lint-opentelemetry-api CI jobopentelemetry-sdk: Add create_meter_provider/configure_meter_provider to declarative file configuration, enabling MeterProvider instantiation from config files without reading env vars (#4987)opentelemetry-sdk: Add create_resource and create_propagator/configure_propagator to declarative file configuration, enabling Resource and propagator instantiation from config files without reading env vars (#4979)opentelemetry-sdk: Map Python CRITICAL log level to OTel FATAL severity text per the specification (#4984)opentelemetry-sdk: Add file configuration support with YAML/JSON loading, environment variable substitution, and schema validation against the vendored OTel config JSON schema (#4898)getting-started and tracecontext jobs caused by GitHub git CDN SHA propagation lag by installing contrib packages from the already-checked-out local copy instead of a second git clone (#4958)opentelemetry-sdk: fix type annotations on MetricReader and related types (#4938)opentelemetry-sdk: implement log creation metric (#4935)opentelemetry-sdk: implement metric reader metrics (#4970)opentelemetry-sdk: implement processor metrics (#5012)opentelemetry-sdk: upgrade vendored OTel configuration schema from v1.0.0-rc.3 to v1.0.0 (#4965)opentelemetry-exporter-prometheus: Fix metric name prefix (#4895)opentelemetry-api, opentelemetry-sdk: Add deepcopy support for BoundedAttributes and BoundedList (#4934)opentelemetry-proto-json, opentelemetry-codegen-json: Implement custom protoc plugin to generate OTLP JSON class definitions (#4910)max_export_batch_size to OTLP HTTP metrics exporter (#4576)opentelemetry-sdk: Implement experimental Meter configurator (#4966)opentelemetry-exporter-otlp-proto-http: use consistent protobuf for export request (#5015)opentelemetry-sdk: cache TracerConfig into the tracer, this changes an internal interface. Only one Tracer with the same instrumentation scope will be created (#5007)max_export_batch_size to use real export (#5036)opentelemetry-sdk: Implement experimental Logger configurator (#4980)opentelemetry-sdk : deprecate LoggingHandler in favor of opentelemetry-instrumentation-logging , see opentelemetry-instrumentation-logging documentati…
BREAKING CHANGE
As part of #4861, start_span and start_as_current_span as part of NoOpTracer were fixed such that they no longer strictly return an INVALID_SPAN if there is a valid span context as the current span context, instead it propagates the span context properly even at the absence of the sdk installed.
opentelemetry-sdk: deprecate LoggingHandler in favor of opentelemetry-instrumentation-logging, see opentelemetry-instrumentation-logging documentation (#4919)opentelemetry-sdk: Clarify log processor error handling expectations in documentation (#4915)opentelemetry-sdk: Drop unused Jaeger exporter environment variables (exporter removed in 1.22.0) (#4918)opentelemetry-sdk: Clarify timeout units in environment variable documentation (#4906)opentelemetry-exporter-otlp-proto-grpc: Fix re-initialization of gRPC channel on UNAVAILABLE error (#4825)opentelemetry-exporter-prometheus: Fix duplicate HELP/TYPE declarations for metrics with different label sets (#4868)OTEL_EXPERIMENTAL_RESOURCE_DETECTORS to * (#4819)opentelemetry-sdk: Fix the type hint of the _metrics_data property to allow None (#4837).SimpleLogRecordProcessor.on_emit, (#4799) and (#4867).opentelemetry-exporter-otlp-proto-http: fix retry logic and error handling for connection failures in trace, metric, and log exporters (#4709)opentelemetry-sdk: avoid RuntimeError during iteration of view instrument match dictionary in MetricReaderStorage.collect() (#4891)opentelemetry-sdk: Fix instrument creation race condition (#4913)opentelemetry-sdk: automatically generate configuration models using OTel config JSON schema (#4879)This is a patch release on the previous 1.39.0/0.60b0 release, fixing the issue(s) below.
This is a patch release on the previous 1.39.0/0.60b0 release, fixing the issue(s) below.
Mark the Events API/SDK as deprecated. The Logs API/SDK should be used instead, an event is now a LogRecord with the event_name field set ( #4654 ).
opentelemetry-api: Convert objects of any type other than AnyValue in attributes to string to be exportable (#4808)
docs: Added sqlcommenter example (#4734)
build: bump ruff to 0.14.1 (#4782)
Add opentelemetry-exporter-credential-provider-gcp as an optional dependency to opentelemetry-exporter-otlp-proto-grpc and opentelemetry-exporter-otlp-proto-http (#4760)
semantic-conventions: Bump to 1.38.0 (#4791)
[BREAKING] Remove LogData and extend SDK LogRecord to have instrumentation scope (#4676)
[BREAKING] Rename several classes from Log to LogRecord
(#4647)
Migration Guide:
LogData has been removed. Users should update their code as follows:
For Log Exporters: Change from Sequence[LogData] to Sequence[ReadableLogRecord]
# Before
from opentelemetry.sdk._logs import LogData
def export(self, batch: Sequence[LogData]) -> LogRecordExportResult:
...
# After
from opentelemetry.sdk._logs import ReadableLogRecord
def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult:
...For Log Processors: Use ReadWriteLogRecord for processing, ReadableLogRecord for exporting
# Before
from opentelemetry.sdk._logs import LogData
def on_emit(self, log_data: LogData):
...
# After
from opentelemetry.sdk._logs import ReadWriteLogRecord, ReadableLogRecord
def on_emit(self, log_record: ReadWriteLogRecord):
# Convert to ReadableLogRecord before exporting
readable = ReadableLogRecord(
log_record=log_record.log_record,
resource=log_record.resource or Resource.create({}),
instrumentation_scope=log_record.instrumentation_scope,
limits=log_record.limits,
)
...Accessing log data: Use the same attributes on ReadableLogRecord/ReadWriteLogRecord
log_record.log_record - The API LogRecord (contains body, severity, attributes, etc.)log_record.resource - The Resourcelog_record.instrumentation_scope - The InstrumentationScope (now included, was in LogData before)log_record.limits - The LogRecordLimitsMark the Events API/SDK as deprecated. The Logs API/SDK should be used instead, an event is now a LogRecord with the event_name field set (#4654).
Fix type checking for built-in metric exporters (#4820)
logs: add warnings for classes that would be deprecated and renamed in 1.39.0
Add experimental composite samplers
OTEL_PYTHON_EXPORTER_OTLP_{HTTP/GRPC}_{METRICS/TRACES/LOGS}_CREDENTIAL_PROVIDER that can be used to
inject a requests.Session or grpc.ChannelCredentials object into OTLP exporters created during auto instrumentation #4689.logger's logs on the export logs path that might otherwise endlessly log or cause a recursion depth exceeded issue in cases where logging itself results in an exception.
(#4695).importlib_metadata.entry_points
(#4735)Add missing Prometheus exporter documentation
LogHandler remains attached to the root logger. Fix a bug that
can cause a deadlock to occur over logging._lock in some cases (#4636).timeout_sec in _export method
(#4691)Logging API accepts optional context; deprecates trace_id, span_id, trace_flags. (#4597) and
event_name as a top level field in the LogRecord. Events are now simply logs with the
event_name field set, the logs SDK should be used to emit events (#4652).type: ignore that causes mypy to ignore the whole file
(#4618)span_exporter property back to BatchSpanProcessor class
(#4621)context; deprecates trace_id, span_id, trace_flags.
(#4597) and
(#4668)Nothing published for this version
Use PEP702 for marking deprecations
BatchLogRecordProcessor and BatchSpanProcessor to simplify code
and make the control flow more clear (#4562
#4535, and
#4580).BatchLogRecordProcessor.emit, this caused the program
to crash at shutdown with a max recursion error (#4586).Nothing published for this version
Fix intermittent Connection aborted error when using otlp/http exporters
Connection aborted error when using otlp/http exporters
(#4477)code.function -> code.function.name, code.lineno -> code.line.number, code.filepath -> code.file.path
(#4508)Nothing published for this version
Fix user agent in OTLP HTTP metrics exporter
environment_variables
(#4491)BaseException change in trace_api.use_span()
(#4494)Nothing published for this version
semantic-conventions: Bump to 1.31.0
OTEL_EXPERIMENTAL_RESOURCE_DETECTORS
(#4373)OTLPSpanExporter
(#4370)tracecontext-integration-test gitref to d782773b2cf2fa4afd6a80a93b289d8a74ca894d
(#4448)trace_api.use_span() record BaseException as well as Exception
(#4406)Always setup logs sdk, OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED only controls python logging module handler setup
logging module handler setup
(#4340)attributes field in metrics.get_meter wrapper function
(#4364)opentelemetry.semconv.attributes.network_attributes.NETWORK_INTERFACE_NAME
introduced by mistake in the wrong module.
(#4391)Fix crash exporting a log record with None body
TestBase.assertEqualSpanInstrumentationInfo method, use assertEqualSpanInstrumentationScope instead
(#4310)ExemplarBuckets in ExemplarReservoirs
(#4260)Nothing published for this version
Nothing published for this version
Removed superfluous py.typed markers and added them where they were missing
OTEL_PYTHON_EXPERIMENTAL_DISABLE_PROMETHEUS_UNIT_NORMALIZATION environment variable
(#4217)LogRecord.getMessage() in order to customize message formatting
(#4216)Make log sdk add exception.message to logRecord for exceptions whose argument is an exception not a string message
exception.message to logRecord for exceptions whose argument
is an exception not a string message
(#4122)link.attributes.dropped, which may not exist
(#4119)OTEL_EXPORTER_OTLP_*HEADERS to match other languages SDKs
(#4103)_start_time_unix_nano attribute from _ViewInstrumentMatch in favor
of using time_ns() at the moment when the aggregation object is created
(#4137)Standardizing timeout calculation in measurement consumer collect to nanoseconds
process.command_args attribute to also include the executable itself
(#4032)start_time_unix_nano for delta collection for explicit bucket histogram aggregation
(#4009)start_time_unix_nano for delta collection for sum aggregation
(#4011)ExponentialHistogramAggregation
(#3978)LogRecord in sdk/log has dropped attributes
due to reaching limits
(#3946)os and net namespaces.Final decorator to constants to prevent collisionsMeterProvider.get_meter and InstrumentationScope
(#4015)SCHEMA_URL constants in opentelemetry-semantic-conventions
(#4069)this is a breaking change to prometheus metric names so they comply with the specification.
SpanAttributes, ResourceAttributes, and MetricInstruments are deprecated.opentelemetry.semconv.attributes
and opentelemetry.semconv.metrics modules.opentelemetry.semconv._incubating import path.
(#3586)OTEL_PYTHON_EXPERIMENTAL_DISABLE_PROMETHEUS_UNIT_NORMALIZATION=trues -> seconds),
following the collector's implementation_ are replaced with a single _{requests}) are stripped awaym/s -> meters_per_second.Fix python 3.12 deprecation warning
tracer.start_as_current_span() decorator work with async functions
(#3633)BaseException instead of Exception in record_exception
(#3354)Use Attribute rather than boundattribute in logrecord
Span.add_link() method to add link after span start
(#3618)OTLPMetricExporter ignores preferred_aggregation property
(#3603)observed_timestamp field
(#3565)code.lineno, code.function and code.filepath to all logs
(#3675)Prometheus exporter sanitize info metric
Fix handling of empty metric collection cycles
SumAggregation
 (#3390)opentelemetry_metrics_exporter entrypoint support pull exporters
(#3428)Modify Prometheus exporter to translate non-monotonic Sums into Gauges
Drop setuptools runtime requirement.
setuptools runtime requirement.
(#3372)Select histogram aggregation with an environment variable
Implement LowMemory temporality
Change __all__ to be statically defined.
__all__ to be statically defined.
(#3143)PeriodicExportingMetricsReader with +Inf interval to support explicit metric collection
Add logarithm and exponent mappings
exporter-otlp-proto-http: add user agent string
(#2959)Add a configurable max_export_batch_size to the gRPC metrics exporter
indent size to LogRecord.to_json()
(#2870)LogEmitter.flush() to align with OTel Log spec
(#2863)preferred_temporality and preferred_aggregation
for ConsoleMetricExporter
(#2911)Add force_flush method to metrics exporter
force_flush method to metrics exporter
(#2852)Resource.to_json()
(#2784)OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE only for OTLP metrics exporter
(#2843)Fix instrument name and unit regexes
opentelemetry-exporter-otlp-proto-http Add support for OTLP/HTTP log exporter
(#2462)None-valued points
(#2745)to_json methods
(#2722Getter and Setter
(#2657)backoff for newer Python versions
(#2726)opentelemetry.propagate module and opentelemetry.propagators package
to the API reference documentation
(#2785)Deprecate InstrumentationLibraryInfo and Add InstrumentationScope
DefaultCounter, DefaultHistogram, DefaultObservableCounter,
DefaultObservableGauge, DefaultObservableUpDownCounter, DefaultUpDownCounter
instruments to NoOpCounter, NoOpHistogram, NoOpObservableCounter,
NoOpObservableGauge, NoOpObservableUpDownCounter, NoOpUpDownCounter
(#2616)Rename API Measurement for async instruments to Observation
enable_default_view option from sdk MeterProvider
(#2547)backoff lib
(#2575)Docs rework: non-API docs are moving to opentelemetry.io. For details, including a list of pages that have moved, see #2453, and #2498.
opentelemetry-exporter-otlp-proto-grpc update SDK dependency to ~1.9.
(#2442)OTEL_EXPORTER_OTLP_ENDPOINT usage in OTLP HTTP trace exporter
(#2493)Add protobuf via gRPC exporting support for Jaeger
fields to propagators (#1374)None for DictGetter if key not found (#1449)opentelemetry-instrumentation package. The
opentelemetry-sdk package now registers an entrypoint opentelemetry_configurator
to allow opentelemetry-instrument to load the configuration for the SDK (#1420)opentelemetry-exporter-zipkin Add support for array attributes in Span and Resource exports (#1285)__repr__ for DefaultSpan, added trace_flags to __repr__ of
SpanContext (#1485])opentelemetry-sdk Add support for OTEL_TRACE_SAMPLER and OTEL_TRACE_SAMPLER_ARG env variables (#1496)opentelemetry-distro package to add default configuration for
span exporter to OTLP (#1482)opentelemetry-exporter-zipkin Updated zipkin exporter status code and error tag (#1486)start_as_current_span-decorated function (#1451)opentelemetry-exporter-otlp Headers are now passed in as tuple as metadata, instead of a
string, which was incorrect. (#1507)opentelemetry-exporter-jaeger Updated Jaeger exporter status code tag (#1488)opentelemetry-api opentelemety-sdk Moved idsgenerator into sdk (#1514)opentelemetry-sdk The B3Format propagator has been moved into its own package: opentelemetry-propagator-b3 (#1513)opentelemetry-exporter-zipkin Update boolean attribute value transformation (#1509)opentelemetry-sdk The JaegerPropagator has been moved into its own package: opentelemetry-propagator-jaeger (#1525)opentelemetry-exporter-jaeger, opentelemetry-exporter-zipkin Update InstrumentationInfo tag keys for Jaeger and Zipkin exporters (#1535)opentelemetry-sdk Remove rate property setter from TraceIdRatioBasedSampler (#1536)opentelemetry-api Remove ThreadLocalRuntimeContext since python3.4 is not supported. (#1482)Add meter reference to observers to fix #1424
One major change done as part of this release was to move the instrumentation out of the core repo and into the contrib repo. This change should not i
One major change done as part of this release was to move the instrumentation out of the core repo and into the contrib repo. This change should not impact users of the published packages, but the release notes for instrumentation packages will now be available in the contrib repo.
🚀 Enhancements
record_exception method (#1314)🚀 Enhancements
OTEL_EXPORTER to the opentelemetry-instrument command (#1036)💥 Breaking Changes
💥 Breaking Changes
MetricRecord class to ExportRecord (#1367)Record class to Accumulation (#1373)Meter class to Accumulator (#1372)🚀 Enhancements)
Add optional parameter to record_exception method (#1314)
Update exception handling optional parameters, add escaped attribute to record_exception (#1365)
ParentBased sampler for implicit parent spans. Fix also trace_state erasure for dropped spans or spans sampled by the TraceIdRatioBased sampler. (#1394)🚀 Enhancements
💥 Breaking Changes
🚀 Enhancements
🚀 Enhancements
record_exception method
(#1314)OTEL_EXPORTER to the opentelemetry-instrument command
(#1036)MetricRecord to ExportRecord
(#1367)Record to Accumulation
(#1373)Meter to Accumulator
(#1372)ParentBased sampler for implicit parent spans. Fix also trace_state
erasure for dropped spans or spans sampled by the TraceIdRatioBased sampler.
(#1394)Updating status codes to adhere to spec
💥 Breaking Changes
🚀 Enhancements
💥 Breaking Changes
🚀 Enhancements
SpanProcessor.on_start accept parent Context (#1251)🚀 Enhancements
SpanProcessor.on_start accept parent Context (#1251)🚀 Enhancements
🚀 Enhancements
🚀 Enhancements
OTEL_PYTHON_DJANGO_INSTRUMENT to False (#1239)🚀 Enhancements
url.rule instead of request.endpoint for span name (#1260)🚀 Enhancements
🚀 Enhancements
SpanProcessor.on_start accept parent Context
(#1251)Update baggage propagation header
💥 Breaking Changes
🚀 Enhancements
OTEL_PROPAGATORS (#1123)ints as ints in the global Configuration object
(#1118)IdsGenerator for TracerProvider (#1153)💥 Breaking Changes
🚀 Enhancements
OTEL_BSP_MAX_QUEUE_SIZE, OTEL_BSP_SCHEDULE_DELAY_MILLIS, OTEL_BSP_MAX_EXPORT_BATCH_SIZE and OTEL_BSP_EXPORT_TIMEOUT_MILLIS environment variables (#1105)IdsGenerator for TracerProvider (#1153)start_as_current_span and use_span can now optionally auto-record any exceptions raised inside the context manager. (#1162)🚀 Enhancements
💥 Breaking Changes
🚀 Enhancements
🚀 Enhancements
max_tag_value_length attribute to customize the maximum allowed size a tag value can have. (#1151)🚀 Enhancements
🚀 Enhancements
OTEL_PYTHON_DJANGO_TRACED_REQUEST_ATTRS (#1154)🚀 Enhancements
OTEL_PYTHON_FALCON_TRACED_REQUEST_ATTRS (#1158)🚀 Enhancements
🐛 Bug Fixes
🚀 Enhancements
OTEL_PYTHON_TORNADO_TRACED_REQUEST_ATTRS (#1178)🚀 Enhancements
🐛 Bug Fixes
record_exception method
(#1242)OTEL_PROPAGATORS
(#1123)OTEL_BSP_MAX_QUEUE_SIZE, OTEL_BSP_SCHEDULE_DELAY_MILLIS, OTEL_BSP_MAX_EXPORT_BATCH_SIZE
and OTEL_BSP_EXPORT_TIMEOUT_MILLIS environment variables
(#1105)ints as ints in the global Configuration object
(#1118)IdsGenerator for TracerProvider
(#1153)max_tag_value_length attribute to customize the
maximum allowed size a tag value can have.
(#1151)start_as_current_span and use_span can now optionally auto-record any exceptions raised inside the context
manager.
(#1162)The 0.13b0 version officially drops support for Python 3.4
The 0.13b0 version officially drops support for Python 3.4 (#1099)
💥 Breaking Changes
SpanContext.is_valid from a method to a data attribute (#1005)get_global_httptextformat and set_global_httptextformat to get_global_textmap and set_global_textmap (#1085)🐛 Bug Fixes
correlationcontext.get_correlations to immutable MappingProxyType (#1024)💥 Breaking Changes
trace.sampling.Decision enum (#1115)🚀 Enhancements
🐛 Bug Fixes
🚀 Enhancements
🚀 Enhancements
🚀 Enhancements
url argument to replace host_name, port, protocol, endpoint. This brings this implementation inline with other implementations. (#1064)🚀 Enhancements
🐛 Bug Fixes
🚀 Enhancements
🚀 Enhancements
url argument to replace host_name,
port, protocol, endpoint. This brings this implementation inline with other
implementations.
(#1064)SpanContext.is_valid from a method to a data attribute
(#1005)correlationcontext.get_correlations to immutable MappingProxyType
(#1024)get_global_httptextformat and
set_global_httptextformat to get_global_textmap and set_global_textmap
(#1085)trace.sampling.Decision enum
(#1115)OTELResourceDetector result when creating resources
(#1096)Update environment variable names, prefix changed from OPENTELEMETRY to OTEL
OPENTELEMETRY to OTEL
(#904)ParentOrElse(AlwaysOn)
(#960)OPENTELEMETRY to OTEL
(#904)OTEL_RESOURCE to OTEL_RESOURCE_ATTRIBUTES as per
the specificationYour coding agent can read these notes before it upgrades. Set up the MCP server →