Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.latitude.so/llms.txt

Use this file to discover all available pages before exploring further.

Filters

Latitude uses a universal filter system across the platform. The same filters you use to narrow traces in a search also power saved searches and evaluation triggers. Learn it once, use it everywhere.

How Filters Work

A filter is a set of field conditions. All conditions within a field are AND’d together, and all fields are AND’d across each other. For example, “Status is ERROR and Cost is greater than 100 microcents” returns only traces matching both criteria. Filters appear on the Traces page, in the Search page (alongside the search query), and in the configuration UI for evaluation triggers.

Available Filter Fields

FieldDescriptionExample
StatusTrace completion status: OK, ERROR, or UNSETstatus in [error]
NameRoot span name (the path you set in capture())name eq "invoke_agent"
Session IDFilter to a specific multi-turn sessionsessionId eq "session-abc"
User IDEnd-user identifier from telemetry metadatauserId eq "user-42"
TagsCustom tags attached to spanstags in ["production", "canary"]
ModelsLLM models used in the tracemodels in ["gpt-4o"]
ProvidersLLM providers calledproviders in ["openai"]
ServicesOpenTelemetry service namesserviceNames in ["api-server"]
CostTotal cost in microcentscost gte 100
DurationEnd-to-end duration in nanosecondsduration gte 5000000000
TTFTTime to first tokenstartTime gte ...
Span CountNumber of spans in the tracespanCount gte 10
Error CountNumber of errored spanserrorCount gte 1
Tokens InputTotal input tokens across LLM callstokensInput gte 1000
Tokens OutputTotal output tokens across LLM callstokensOutput gte 500
MetadataCustom key-value metadata your application sendsmetadata.env eq "production"

Operators

Filters support 10 operators:
OperatorMeaningWorks With
eqEqualsAll fields
neqNot equalsAll fields
gtGreater thanNumeric fields
gteGreater than or equalNumeric fields
ltLess thanNumeric fields
lteLess than or equalNumeric fields
inValue is in setStatus, tags, models, providers, services
notInValue is not in setStatus, tags, models, providers, services
containsSubstring match (case-insensitive)Text fields, metadata
notContainsSubstring does not matchText fields, metadata

Custom Metadata Filters

Your application can send structured metadata with its telemetry. Filter on any metadata field using dot-notation:
  • metadata.env: top-level key
  • metadata.runtime.region: nested keys (up to 12 levels deep)
Metadata filters support all operators, so you can filter for exact matches, ranges, set membership, and substring searches on your custom fields.

Combining Filters

All active filters combine with AND logic. Common combinations:
  • Status = ERROR and Cost > 100: find expensive failures
  • Models = gpt-4o and Duration > 5s: find slow GPT-4o traces
  • Metadata environment = production and Error Count > 0: find production errors
  • Tags in ["canary"] and Tokens Output > 2000: find verbose canary responses

Where Filters Are Used

FeatureHow Filters Are Used
Trace dashboardInteractive filtering from the toolbar
SearchNarrow a search query to a specific subset of traces
Saved searchesThe filter set is part of what gets bookmarked alongside the query
Evaluation triggersDefine which traces an evaluation monitors
Score analyticsNarrow analytics dashboards to specific trace subsets
When you configure an evaluation trigger or save a search, you’re building a filter using this same system. An empty filter means “match all traces.”

Next Steps