Skip to content

Tags

Tags are string labels that help you categorize and filter traces. You can apply multiple tags to a single trace or observation, and XeroML automatically aggregates tags from all observations up to the trace level.

Common uses for tags: feature area, endpoint name, experiment name, model variant, or any categorical label that’s useful for filtering.

Tag Limits

  • Maximum 200 characters per tag
  • Tags exceeding 200 characters are silently dropped
  • No limit on number of tags per trace

Adding Tags

Use propagate_attributes() to attach tags to all observations in a context:

from xeroml import observe, propagate_attributes
@observe()
def handle_request(query: str) -> str:
with propagate_attributes(tags=["feature:search", "model:gpt-4o"]):
result = run_search_pipeline(query)
return result

Tags can also be set directly when creating an observation:

from xeroml import get_client
xeroml = get_client()
with xeroml.start_as_current_observation(
name="my-span",
type="span",
tags=["experiment:v2", "region:us-east"]
) as obs:
result = process()

Automatic Aggregation

When tags are applied to individual observations within a trace, XeroML automatically merges all unique tags onto the trace object. This means you can filter traces by tag even when the tag was only applied to a child observation.

Filtering in the UI

Tags appear as filter options in the Traces list view. Select one or more tags to narrow down traces for investigation or dataset creation.