Adds custom session-level attributes that persist across all spans in the current context. Session attributes are key-value pairs that apply to all operations within the current execution context (thread or async coroutine). Use this to add metadata that describes the session environment, such as user information, deployment environment, or feature flags. These attributes are stored in context variables and automatically included in all spans created during the session. They persist until the context ends or the attribute is updated with a new value. Note: Context variables are shallow copied - modifications to mutable values (lists, dicts) are shared between contexts.Documentation Index
Fetch the complete documentation index at: https://handbook.fiddler.ai/llms.txt
Use this file to discover all available pages before exploring further.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
key | str | ✓ | - | The attribute key to add or update. Will be formatted as ‘fiddler.session.user.’ in the OpenTelemetry span. |
value | str | bool | int | float | Sequence[str | bool | int | float] | ✓ | - | Accepts any OpenTelemetry primitive value type, or a homogeneous sequence of one of these types. Available since fiddler-otel 1.1.1; earlier versions accepted only str. |