Using observe
Pass static tags directly to observe:
- Python
- TypeScript
Using using_attributes / usingAttributes
Propagate tags to all traces within a block:
- Python
- TypeScript
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Label traces with string tags for filtering and categorization
observeobserve:
from traceroot import observe
@observe(name="run_agent", type="agent", tags=["production", "v2"])
def run_agent(query: str):
return process(query)
import { observe } from '@traceroot-ai/traceroot';
const result = await observe(
{ name: 'run_agent', type: 'agent', tags: ['production', 'v2'] },
async () => process(query),
);
using_attributes / usingAttributesfrom traceroot import using_attributes
with using_attributes(tags=["staging", "experiment-a"]):
agent.run(query)
import { usingAttributes } from '@traceroot-ai/traceroot';
await usingAttributes({ tags: ['staging', 'experiment-a'] }, async () => {
await agent.run(query);
});