When to use
Resource attributes
Resource attributes describe the service that produced the spans. Set them once, inconfigure() or on your TracerProvider.
Identity attributes
Identity attributes connect a trace to the User and Session subjects. Atlas reads them from the root span of each trace.
Set both on the root span when the request starts:
handler.py
user.id can’t be joined to users. Traces without session.id each count as their own session.
GenAI attributes
Atlas follows the OpenTelemetry GenAI semantic conventions. Instrumentors such asopentelemetry-instrumentation-openai-v2 set most of these for you.
Message content
Polaris labels spans from their prompt, response and tool input and output. Instrumentors only record message content when this env var is set:Custom attributes
Any other attribute on a span is kept and can be used as a filter or Group By in Atlas, for examplesearch.result_count or customer.plan.
MCP prompt examples
“Show me the sessions for user 8812 in the last 7 days”
“Compare the Misstep rate on search_orders between service.version 1.4.0 and 1.5.0”
“Which traces in production yesterday had more than 5 tool calls, grouped by gen_ai.request.model?”
Related
- Concepts: the User, Session, Trace and Span subjects.
- Send traces from Python: where to set these attributes in code.