Attribute keys
Reference for the public judgment.* span attribute keys Judgment accepts as attribute-mapper targets.
Judgment reads the following public judgment.* OpenTelemetry span
attributes as structured fields. The Judgeval SDKs set them for you. Use this
reference when you add attributes manually,
export raw OpenTelemetry spans, or choose a target for an
attribute mapper.
Attributes that use other keys remain stored and searchable as custom attributes.
Core
Control how a span is displayed in the trace view.
| Attribute key | Description |
|---|---|
judgment.input | The input a step receives. |
judgment.output | The output a step produces. |
judgment.llm.tool_calls | Structured tool/function calls made during a step. |
judgment.span_kind | The type of step (`llm`, `tool`, `function`, `agent`, ...). Judgment infers this automatically when usage or provider/model attributes are present, so you rarely need to set it yourself. |
judgment.span_name | The name shown for this step in the trace. Falls back to the raw OpenTelemetry span name when unset. |
judgment.agent_version | The version of the agent or prompt implementation used for this step. Powers the agent-version breakdown in monitoring. |
Identifiers
Group traces so they can be filtered and broken down in monitoring.
| Attribute key | Description |
|---|---|
judgment.session_id | Ties multiple traces to one conversation or session. Map here to view all of a user's requests together. |
judgment.customer_id | Which of your customers (tenant/account) a trace belongs to. Map here to filter and break down activity by customer. |
judgment.customer_user_id | Which individual end user a trace belongs to. Map here to trace activity down to a single user. |
Usage & Cost
Judgment prices a span from its provider, model, and token counts. If you already have a cost figure, set judgment.usage.total_cost_usd instead.
| Attribute key | Description |
|---|---|
judgment.llm.provider | The model provider, e.g. OpenAI or Anthropic. Map here so Judgment can price token usage accurately. |
judgment.llm.model | The exact model used, e.g. gpt-4o. Map here (together with provider) so cost is calculated correctly. |
judgment.usage.non_cached_input_tokens | Input tokens charged at the normal (uncached) rate. Map here to report input token cost. |
judgment.usage.cache_creation_input_tokens | Input tokens written into the prompt cache. Map here to track prompt-cache write cost. |
judgment.usage.reasoning_tokens | Tokens a reasoning model spends "thinking". Map here to account for reasoning cost. |
judgment.usage.cache_read_input_tokens | Input tokens read from the prompt cache at the cheaper cached rate. Map here to track cache savings. |
judgment.usage.output_tokens | Tokens the model generated in its response. Map here to report output token cost. |
judgment.usage.non_cached_input_image_tokens | Image input tokens charged at the normal rate. Map here if your model bills image inputs separately. |
judgment.usage.output_image_tokens | Image tokens the model generated. Map here if your model bills image outputs separately. |
judgment.usage.total_cost_usd | A total cost you have already computed for this step, in USD. Map here to report cost directly instead of from tokens. |