Skip to main content

Documentation Index

Fetch the complete documentation index at: https://traceroot.ai/docs/llms.txt

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

Metadata is key-value pairs attached to traces or spans — useful for model versions, request IDs, feature flags, or any structured context you want to search on.

Using observe

Pass static metadata to observe for values known at definition time:
from traceroot import observe

@observe(name="process", type="agent", metadata={"version": "v2", "tier": "premium"})
def process(query: str):
    return result

Using using_attributes / usingAttributes

Propagate metadata to all traces and spans within a block:
from traceroot import using_attributes

with using_attributes(metadata={"deploy": "canary", "region": "us-west-2"}):
    agent.run(query)