microsoft.opentelemetry.a365.hosting.middleware package
- class microsoft.opentelemetry.a365.hosting.middleware.BaggageMiddleware[source]
Bases:
objectMiddleware that propagates OpenTelemetry baggage context derived from TurnContext.
Async replies (ContinueConversation) are passed through without baggage setup.
- class microsoft.opentelemetry.a365.hosting.middleware.OutputLoggingMiddleware[source]
Bases:
objectMiddleware that creates
OutputScopespans for outgoing messages.Links to a parent span when
A365_PARENT_TRACEPARENT_KEYis set inturn_state.Privacy note: Outgoing message content is captured verbatim as span attributes and exported to the configured telemetry backend.
- class microsoft.opentelemetry.a365.hosting.middleware.ObservabilityHostingManager[source]
Bases:
objectSingleton manager for configuring hosting-layer observability middleware.
Example
ObservabilityHostingManager.configure(adapter.middleware_set, ObservabilityHostingOptions( enable_output_logging=True, ))
- classmethod configure(middleware_set, options)[source]
Configure the singleton instance and register middleware.
Subsequent calls after the first are no-ops and return the existing instance.
- Parameters:
middleware_set (
MiddlewareSet) – The middleware set to register middleware on (e.g.,adapter.middleware_set).options (
ObservabilityHostingOptions) – Configuration options controlling which middleware to enable.
- Return type:
- Returns:
The singleton
ObservabilityHostingManagerinstance.- Raises:
TypeError – If middleware_set or options is
None.
- class microsoft.opentelemetry.a365.hosting.middleware.ObservabilityHostingOptions(enable_baggage=False, enable_output_logging=False)[source]
Bases:
objectConfiguration options for the hosting observability layer.