Setting Tags
Pass atags array when creating a trace. All spans within the trace inherit these tags:
- TypeScript
- Python
Tags on Child Spans
Tags set on the parent trace are aggregated to the trace level. You can also set tags on individual child spans:Filtering by Tags
Tags appear as a column in the trace list. Filter by navigating to Traces, clicking Filters, selecting Tags, and choosing an operator and value.Tags vs Metadata
| Tags | Metadata | |
|---|---|---|
| Format | Array of strings | Key-value pairs |
| Best for | Categorical labels (environment, team, feature) | Unique identifiers (user IDs, request IDs) |
| Set size | Small, known set of values | Unlimited unique values |
Best Practices
- Use kebab-case —
production,team-alpha,chat-v2(notProduction,team_alpha) - Define tags as constants to avoid typos
- Keep the tag set small — Tags with hundreds of unique values belong in metadata
- Recommended patterns: environment (
production,staging), team (team-alpha), feature (chat-v2), experiment (exp-new-prompt), release (v2.1.0)
Metadata
Key-value pairs for context and debugging
Filtering & Search
Combine tags with other filters
Have Questions?
We’re here to help! Choose the best way to reach us:
- Email us at hello@agentmark.co for support
- Schedule an Enterprise Demo to learn about our business solutions