microsoft.opentelemetry.a365.core.middleware.baggage_builder module
- class microsoft.opentelemetry.a365.core.middleware.baggage_builder.BaggageBuilder[source]
Bases:
objectPer request baggage builder.
This class provides a fluent API for setting baggage values that will be propagated in the OpenTelemetry context.
Example
builder = (BaggageBuilder() .tenant_id("tenant-123") .agent_id("agent-456")) with builder.build(): # Baggage is set in this context pass # Baggage is restored after exiting the context
- operation_source(value)[source]
Set the operation source baggage value.
This captures the name of the service using the SDK.
- tenant_id(value)[source]
Set the tenant ID baggage value.
- Parameters:
- Return type:
- Returns:
Self for method chaining
- agent_id(value)[source]
Set the agent ID baggage value.
- Parameters:
- Return type:
- Returns:
Self for method chaining
- agentic_user_id(value)[source]
Set the agentic user ID baggage value.
- Parameters:
- Return type:
- Returns:
Self for method chaining
- agentic_user_email(value)[source]
Set the agentic user email baggage value.
- Parameters:
- Return type:
- Returns:
Self for method chaining
- agent_blueprint_id(value)[source]
Set the agent blueprint ID baggage value.
- Parameters:
- Return type:
- Returns:
Self for method chaining
- user_id(value)[source]
Set the user ID baggage value.
- Parameters:
- Return type:
- Returns:
Self for method chaining
- invoke_agent_server(address, port=None)[source]
Set the invoke agent server address and port baggage values.
- Parameters:
- Return type:
- Returns:
Self for method chaining
- channel_name(value)[source]
Sets the channel name baggage value (e.g., ‘Teams’, ‘msteams’).
- Return type: