Quick Start
Useenrich_session() to add user context to the entire trace, or enrich_span() to add it to a specific operation.
On the Session
Add user properties that apply to the entire user interaction:On a Span
Add user properties to a specific function or operation:Concepts
What are User Properties?
User properties are attributes that identify or describe the user making a request. They’re stored in a dedicateduser_properties namespace, displayed separately from other metadata in the dashboard.
Common user properties:
- Identifiers: user ID, email, account ID
- Attributes: subscription plan, role, region
- Flags: is_beta, is_internal, is_premium
User Properties vs Metadata
Bothuser_properties and metadata store key-value data. The difference is organizational:
| Namespace | Use for | Dashboard display |
|---|---|---|
user_properties | User context (who) | Separate “User Properties” section |
metadata | Request context (what) | “Metadata” section |
user_properties when the data describes the user. Use metadata for everything else (feature flags, request IDs, environment info).
Data Types
| Type | Example |
|---|---|
| String | "user_id": "user_12345" |
| Number | "age": 25 |
| Boolean | "is_premium": true |
| Object | "preferences": {"theme": "dark"} |
Learn More
SDK Reference
- Python SDK Reference -
enrich_session(),enrich_span()

