UseDocumentation Index
Fetch the complete documentation index at: https://docs.pandaprobe.com/llms.txt
Use this file to discover all available pages before exploring further.
user_id to associate traces and sessions with a specific end user, account, organization, or tenant in your application.
Unlike session_id, which groups traces into an agent lifecycle, user_id identifies who the activity belongs to. This makes it easier to filter traces, compare user experiences, and join PandaProbe data back to your own identity system.
User identifiers are strings you control. Use the same stable identifier your application already uses for the user, account, or tenant.
Context managers (scoped)
Preferpandaprobe.user() when user attribution can be scoped to a block of code. The user is applied to all traces created inside the block and is reset when the block exits.
Imperative API (global)
Useset_user() when request middleware or worker setup needs to set the user once before calling into application code.
Explicit parameters
Explicit parameters take precedence over scoped or global values:user_id:

