Judgment Labs Logo

Attribute Keys

Reference for the judgment.* span attribute keys Judgment reads when ingesting traces.

Judgment reads a fixed set of judgment.* OpenTelemetry span attributes when it ingests a trace. The Judgeval SDKs set these for you. You only need this reference when you write attributes yourself — with set_attribute, from a raw OpenTelemetry SDK, or as the target key of an attribute mapper.

Anything outside this list is still stored and searchable, but Judgment treats it as an arbitrary custom attribute.

Core

Control how a span is displayed in the trace view.

KeyDescription
judgment.span_nameThe name shown for this step in the trace.
judgment.span_kindThe type of step (llm, tool, function, agent, ...).
judgment.inputThe input a step receives.
judgment.outputThe output a step produces.

Identifiers

Group traces so they can be filtered and broken down in monitoring.

KeyDescription
judgment.session_idTies multiple traces to one conversation or session.
judgment.customer_idWhich of your customers (tenant or account) a trace belongs to.
judgment.customer_user_idWhich individual end user a trace belongs to.

Usage and 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.

KeyDescription
judgment.llm.providerThe model provider, e.g. openai or anthropic.
judgment.llm.modelThe exact model used, e.g. gpt-4o.
judgment.usage.non_cached_input_tokensInput tokens charged at the normal (uncached) rate.
judgment.usage.cache_creation_input_tokensInput tokens written into the prompt cache.
judgment.usage.cache_read_input_tokensInput tokens read from the prompt cache at the cheaper cached rate.
judgment.usage.reasoning_tokensTokens a reasoning model spends thinking.
judgment.usage.output_tokensTokens the model generated in its response.
judgment.usage.non_cached_input_image_tokensImage input tokens, for models that bill them separately.
judgment.usage.output_image_tokensGenerated image tokens, for models that bill them separately.
judgment.usage.total_cost_usdA cost you computed yourself for this step, in USD.