Learn how to set metadata on your traces
enrich_session
function to set on the trace level.To pass to HoneyHive, pass it to the param in the enrich_session
function. This function is used to enrich the session with additional information. Remember that enrich_session
will update, not overwrite, the existing object on the trace.Read more about the enrich_session
function in the Python SDK reference.Here’s an example of how to set on the trace level in Python:total_tokens
: Total tokens used in the session/eventcompletion_tokens
: Completion tokens used in the session/eventprompt_tokens
: Prompt tokens used in the session/eventcost
: Cost of the session/eventnum_events
: Number of events in the sessionnum_model_events
: Number of model events in the sessionhas_feedback
: Whether the session has feedback on any of the eventsrun_id
: Evaluation run ID used to group sessions for an evaluation runenrich_session
function in the Python SDK reference.