Change8

v1.31.0

📦 opentelemetry
4 features🐛 5 fixes🔧 8 symbols

Summary

This release includes several bug fixes across OTLP encoding, Prometheus exporter labeling, and resource detector loading, alongside new type annotations and improved exception handling in span recording.

✨ New Features

  • Add type annotations to context's attach & detach
  • Type indent parameter in to_json
  • Tolerates exceptions when loading resource detectors via OTEL_EXPERIMENTAL_RESOURCE_DETECTORS
  • Make trace_api.use_span() record BaseException as well as Exception

🐛 Bug Fixes

  • Fix OTLP encoders missing instrumentation scope schema url and attributes
  • prometheus-exporter: fix labels out of place for data points with different attribute sets
  • Disconnect gRPC client stub when shutting down OTLPSpanExporter
  • opentelemetry-sdk: fix OTLP exporting of Histograms with explicit buckets advisory
  • Fix env var error message for TraceLimits/SpanLimits

🔧 Affected Symbols

context.attachcontext.detachto_jsonOTEL_EXPERIMENTAL_RESOURCE_DETECTORSOTLPSpanExportertrace_api.use_spanTraceLimitsSpanLimits