github Azure/azure-sdk-for-python corehttp_1.0.0b7

latest release: azure-mgmt-agricultureplatform_1.0.0b1
pre-release7 hours ago

1.0.0b7 (2026-02-05)

Features Added

  • Native tracing support was added. #39172
    • The OpenTelemetryTracer class was added to the corehttp.instrumentation.tracing.opentelemetry module. This is a wrapper around the OpenTelemetry tracer that is used to create spans for SDK operations.
    • Added a get_tracer method to the new corehttp.instrumentation module. This method returns an instance of the OpenTelemetryTracer class if OpenTelemetry is available.
    • A TracingOptions TypedDict class was added to define the options that SDK users can use to configure tracing per-operation. These options include the ability to enable or disable tracing and set additional attributes on spans.
      • Example usage: client.method(tracing_options={"enabled": True, "attributes": {"foo": "bar"}})
    • DistributedHttpTracingPolicy and distributed_trace/distributed_trace_async decorators were added to support OpenTelemetry tracing for SDK operations.
      • SDK clients can define an _instrumentation_config class variable to configure the OpenTelemetry tracer used in method span creation. Possible configuration options are library_name, library_version, schema_url, and attributes.
  • Added a global settings object, corehttp.settings, to the corehttp package. This object can be used to set global settings for the corehttp package. Currently the only setting is tracing_enabled for enabling/disabling tracing. #39172
  • Added start_time and context keyword arguments to OpenTelemetryTracer.start_span and start_as_current_span methods.
  • Added set_span_error_status static method to OpenTelemetryTracer for setting a span's status to ERROR.
  • Added is_generated_model, attribute_list, and TypeHandlerRegistry to corehttp.serialization module for SDK model handling.

Bugs Fixed

  • Fixed retry_backoff_max being ignored in retry policies when configuring retries.
  • Raise correct exception if transport is used while already closed.
  • A timeout error when using the aiohttp transport will now be raised as a corehttp.exceptions.ServiceResponseTimeoutError, a subtype of the previously raised ServiceResponseError.
  • When using with aiohttp 3.10 or later, a connection timeout error will now be raised as a corehttp.exceptions.ServiceRequestTimeoutError, which can be retried.
  • Fixed leaked requests and aiohttp exceptions for streamed responses.
  • Improved granularity of ServiceRequestError and ServiceResponseError exceptions raised in timeout scenarios from the requests and aiohttp transports.
  • BearerTokenCredentialPolicy and AsyncBearerTokenCredentialPolicy will now properly chain exceptions raised during claims challenge handling. If a credential raises an exception when attempting to acquire a token in response to a claims challenge, that exception will be raised with the original 401 response as the cause.

Other Changes

  • Added opentelemetry-api as an optional dependency for tracing. #39172

Don't miss a new azure-sdk-for-python release

NewReleases is sending notifications on new releases.