set_test_context
Set user, session, and agent identifiers to test Langfuse trace filtering by different contexts in the dashboard.
Instructions
Set test context values for Langfuse attribution demos.
Changes here affect what user_id, session_id, and metadata are sent to Langfuse traces. Use this to test filtering by different users or sessions in the Langfuse dashboard.
Args: user_id: User identity (e.g., "alice", "bob"). org_id: Organization identity (e.g., "acme", "globex"). session_id: Session identifier for grouping traces. agent_id: Agent identity (e.g., "claude", "gpt4").
Returns: Updated context state and example of Langfuse attributes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org_id | No | ||
| user_id | No | ||
| agent_id | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||