Skip to main content

Overview

Use this page as a reference for which attributes Fiddler indexes, how to type their values, and how they map to FQL attribute() and Span:: filters.
Attributes are key-value pairs attached to OpenTelemetry spans and resources. They carry the data that powers Fiddler’s dashboards, alerts, evaluators, and custom metrics. Getting attributes right means:
  • Attributes are present in OpenTelemetry spans.
  • Values use the correct type so numeric attributes are aggregatable and alertable (not silently treated as strings).
  • Custom attributes follow the naming convention so they appear in the trace explorer and are queryable via FQL.
This page is the single reference for how attributes work across all Fiddler integrations.

Attribute Levels

Attributes are set at two levels in the OTLP hierarchy:
LevelScopeSet onExample
ResourceEntire trace (all spans share these)Resource.attributesapplication.id
SpanIndividual operationSpan.attributesfiddler.span.type, gen_ai.request.model

Required Attributes

These must be present on every trace sent to Fiddler. Fiddler rejects traces that omit either field.
AttributeLevelDescription
application.idResourceYour Fiddler application UUID (UUID4 format)
fiddler.span.typeSpanType of operation: llm, tool, chain, or agent

System Attributes

System attributes are stored under the fiddler.span.system.* prefix internally. They are registered in the attribute catalog and available for FQL custom metrics via attribute('...', type='system', scope='span'). Some are also available as dedicated span columns for fast filtering (via Span:: redirects); the rest are filtered via SpanAttribute::.
AttributeTypeTrace explorer filterDescription
gen_ai.agent.namestringAgent (Span::agent_name)Name of the AI agent
fiddler.span.typestringType (Span::span_type)Type of operation: llm, tool, chain, or agent
gen_ai.tool.namestringgen_ai.tool.name (system) (SpanAttribute::gen_ai.tool.name)Tool or function name
gen_ai.usage.input_tokensintgen_ai.usage.input_tokens (system) (SpanAttribute::gen_ai.usage.input_tokens)Input tokens consumed
gen_ai.usage.output_tokensintgen_ai.usage.output_tokens (system) (SpanAttribute::gen_ai.usage.output_tokens)Output tokens consumed
gen_ai.usage.total_tokensintgen_ai.usage.total_tokens (system) (SpanAttribute::gen_ai.usage.total_tokens)Total tokens consumed
latencyintDuration (Span::duration)Span duration (computed automatically from start/end time)

Identity Attributes

Identity attributes are stored as metadata internally and materialized into dedicated span columns. They appear as Session ID and Agent ID columns in the trace explorer. They are not registered in the attribute catalog and cannot be used in FQL custom metrics.
AttributeTypeTrace explorer filterDescription
gen_ai.conversation.idstringSession ID (Span::session_id)Groups spans into a multi-turn conversation
gen_ai.agent.idstringAgent ID (Span::agent_id)Unique identifier for the agent
Set agent attributes on every span. If you provide gen_ai.agent.name or gen_ai.agent.id, set them on every span within the trace. Fiddler uses these to attribute spans to the correct agent — spans missing these fields will be unattributed even if other spans in the same trace carry them.

Content Attributes

These attributes are visible in the trace explorer but are not registered as queryable attributes — they cannot be used in FQL custom metrics or span filters.

LLM Content

AttributeTypeDescription
gen_ai.request.modelstringModel name (e.g., gpt-4o, claude-3-opus)
gen_ai.systemstringLLM provider (e.g., openai, anthropic)
gen_ai.llm.input.systemstringSystem prompt
gen_ai.llm.input.userstringUser input (last user message)
gen_ai.llm.outputstringLLM response text
gen_ai.llm.contextstringConversation history (prior messages)

Tool Content

AttributeTypeDescription
gen_ai.tool.inputstring (JSON)Arguments passed to the tool
gen_ai.tool.outputstring (JSON)Result returned by the tool

Custom User Attributes

Attach business-level metadata to spans using two namespaces:
NamespaceScopeDescription
fiddler.span.user.{key}Individual spanMetadata for a specific operation
fiddler.session.user.{key}All spans in the traceSession-wide context shared across every span
fiddler.span.user.* attributes are indexed, appear as filterable columns in the trace explorer, and are available for custom metrics via the FQL attribute() function. fiddler.session.user.* attributes are visible in the trace detail side panel only — they do not appear as columns in the trace explorer grid and are not available for custom metrics or filtering.

Attribute Value Types

Under the hood, every attribute value is wrapped in an OTel AnyValue protobuf message. Using the correct typed field is critical — it determines whether Fiddler classifies the attribute as numeric (enabling aggregation, charting, and alerting) or string.
Python typeAnyValue fieldFiddler storage type
strstring_valueString
intint_valueNumeric (stored as float)
floatdouble_valueNumeric (stored as float)
boolbool_valueString
Use int_value / double_value for numeric attributes. If you wrap a number in string_value (e.g., AnyValue(string_value="150")), Fiddler treats it as a string column. You lose the ability to compute aggregations (sum, average, percentiles) and set numeric alerts on that attribute.

SDK usage (high-level)

When using the Fiddler OTel SDK, LangGraph SDK, or Strands SDK, pass native Python types and the SDK handles typing automatically:
span.set_attribute("gen_ai.usage.input_tokens", 150)       # int → int_value
span.set_attribute("fiddler.span.user.confidence", 0.97)    # float → double_value
span.set_attribute("fiddler.span.user.region", "us-west")   # str → string_value
span.set_attribute("fiddler.span.user.is_internal", False)   # bool → bool_value

Protobuf usage (low-level)

When building protobuf Span objects directly (e.g., for OTel trace export), you must set the correct AnyValue field explicitly:
from opentelemetry.proto.common.v1.common_pb2 import AnyValue, KeyValue

# Numeric — use int_value / double_value
KeyValue(key="gen_ai.usage.input_tokens",       value=AnyValue(int_value=150))
KeyValue(key="fiddler.span.user.confidence",    value=AnyValue(double_value=0.97))

# String
KeyValue(key="fiddler.span.user.region",        value=AnyValue(string_value="us-west"))

# Boolean
KeyValue(key="fiddler.span.user.is_internal",   value=AnyValue(bool_value=False))
For a copy-pastable to_any_value() helper that handles type dispatch automatically, see the OTel Trace Export — AnyValue Typing section.

How Attributes Flow into Fiddler

Once ingested, attributes power several Fiddler features:
FeatureHow attributes are used
Trace ExplorerFilter, search, and group traces by any attribute
Dashboards & ChartsBuilt-in charts use system attributes (tokens, latency); custom charts reference any attribute
Custom MetricsFQL expressions use attribute('name', type, scope) to define computed metrics
AlertsSet threshold or anomaly alerts on numeric attributes (requires correct typing)
EvaluatorsEnrichment evaluators can read span attributes as input context

Querying attributes with FQL

The attribute() function is the FQL primitive for referencing span data in custom metrics. Only system and user attributes are queryable — see Attribute Quick Overview for the full classification.
attribute(name='name', type='system'|'user', scope='span'[, value='...'])
ParameterRequiredDescription
nameYesAttribute key. For type='system', use the OTel key (e.g., gen_ai.usage.input_tokens). For type='user', use the bare key without the fiddler.span.user. prefix (e.g., confidence, not fiddler.span.user.confidence).
typeYes'system' for system attributes (see System Attributes), 'user' for custom fiddler.span.user.* attributes
scopeYesCurrently only 'span' is supported
valueNoFilters to spans where the attribute equals this string value. When set, the attribute is treated as a string. Used with count() for categorical breakdowns (e.g., count(attribute('fiddler.span.type', type='system', scope='span', value='llm'))).
System attribute examples:
-- Average input tokens per span
average(attribute('gen_ai.usage.input_tokens', type='system', scope='span'))

-- Count spans by agent name
count(attribute('gen_ai.agent.name', type='system', scope='span', value='my-agent'))

-- Ratio of LLM spans
count(attribute('fiddler.span.type', type='system', scope='span', value='llm'))
  / count(attribute('fiddler.span.type', type='system', scope='span'))
User attribute examples:
-- P95 of a custom latency attribute
quantile(attribute('response_time_ms', type='user', scope='span'), level=0.95)

-- Ratio of premium-tier spans
count(attribute('tier', type='user', scope='span', value='premium'))
  / count(attribute('tier', type='user', scope='span'))
See Custom Metrics for the full FQL reference and more examples.

Attribute Quick Overview

All attributes listed below are visible in the trace explorer. The Custom metrics and Trace explorer filter columns indicate additional availability for FQL and UI filtering respectively. The trace explorer filter column shows both the UI column name (what you see in the DataGrid header) and the API filter field (used in programmatic filter.rules[].field requests). The UI automatically maps column filters to the API syntax.
AttributeLevelRequiredCustom metricsTrace explorer filterTypeAnyValue field
application.idResourceYesUUID stringstring_value
gen_ai.agent.nameSpanNosystemAgent (Span::agent_name)stringstring_value
fiddler.span.typeSpanYessystemType (Span::span_type)llm | tool | chain | agentstring_value
gen_ai.agent.idSpanNoAgent ID (Span::agent_id)stringstring_value
gen_ai.conversation.idSpanNoSession ID (Span::session_id)stringstring_value
gen_ai.tool.nameSpanNosystemgen_ai.tool.name (system) (SpanAttribute::gen_ai.tool.name)stringstring_value
gen_ai.usage.input_tokensSpanNosystemgen_ai.usage.input_tokens (system) (SpanAttribute::gen_ai.usage.input_tokens)intint_value
gen_ai.usage.output_tokensSpanNosystemgen_ai.usage.output_tokens (system) (SpanAttribute::gen_ai.usage.output_tokens)intint_value
gen_ai.usage.total_tokensSpanNosystemgen_ai.usage.total_tokens (system) (SpanAttribute::gen_ai.usage.total_tokens)intint_value
latencySpanNosystemDuration (Span::duration)int— (computed)
gen_ai.request.modelSpanNostringstring_value
gen_ai.systemSpanNostring (provider name)string_value
gen_ai.llm.input.systemSpanNostringstring_value
gen_ai.llm.input.userSpanNostringstring_value
gen_ai.llm.outputSpanNostringstring_value
gen_ai.llm.contextSpanNostringstring_value
gen_ai.tool.inputSpanNostring (JSON)string_value
gen_ai.tool.outputSpanNostring (JSON)string_value
fiddler.span.user.*SpanNouser<key> (user) (SpanAttribute::<key>)anyUse typed field matching the value (see Attribute Value Types)
Only system and user attributes support custom metrics. Content fields (like gen_ai.llm.output, gen_ai.request.model) are visible in the trace explorer but cannot be used in FQL attribute() expressions or aggregations. Identity fields (gen_ai.agent.id, gen_ai.conversation.id) are filter-only. If you need to compute metrics over a non-queryable field, attach it as a fiddler.span.user.* custom attribute instead.