User Tracking
The Users view provides an overview of all users. It also offers an in-depth look into individual users.
It’s easy to map data in Langfuse to individual users. Just propagate the userId attribute across observations. This can be a username, email, or any other unique identifier. The userId is optional, but using it helps you get more from Langfuse aggregating metrics such as LLM usage cost by userId. See the integration docs to learn more.
When using the @observe() decorator:
from langfuse import observe, propagate_attributes
@observe()
def process_user_request(user_query):
# Propagate user_id to all child observations
with propagate_attributes(user_id="user_12345"):
# All nested observations automatically inherit user_id
result = process_query(user_query)
return resultWhen creating observations directly:
from langfuse import get_client, propagate_attributes
langfuse = get_client()
with langfuse.start_as_current_span(
name="process-user-request"
) as root_span:
# Propagate user_id to all child observations
with propagate_attributes(user_id="user_12345"):
# All observations created here automatically have user_id
with root_span.start_as_current_generation(
name="generate-response",
model="gpt-4o"
) as gen:
# This observation automatically has user_id
pass- Values must be strings ≤200 characters
- Call early in your trace to ensure all observations are covered. This way you make sure that all Metrics in Langfuse are accurate.
- Invalid values are dropped with a warning
View all users
The user list provides an overview of all users that have been tracked by Langfuse. It makes it simple to segment by overall token usage, number of traces, and user feedback.

Individual user view
The individual user view provides an in-depth look into a single user. Explore aggregated metrics or view all traces and feedback for a user.
You can deep link to this view via the following URL format: https://<hostname>/project/{projectId}/users/{userId}