Setting Tags
Use Cases
- Feature Flags
- A/B Testing
- Subscription Tiers
- Deployment
Track which feature flags were active when errors occur:Filter in dashboard:
- “Show errors where
flag_new_checkout = true” - “Compare error rates between flag variants”
Request Context
Track request-specific dimensions with middleware:Best Practices
Use Consistent Key Names
Use Consistent Key Names
Keep Values Low-Cardinality
Keep Values Low-Cardinality
Tags work best with a limited set of values:
Use Meaningful Values
Use Meaningful Values
Avoid Sensitive Data
Avoid Sensitive Data
Prefix Related Tags
Prefix Related Tags
Tag Lifecycle
Tags are scoped to the current request/context (using Python’scontextvars):
Viewing Tags in Dashboard
Tags appear in the error detail view:Filtering by Tags
In the issue list:- Click Add Filter
- Select a tag key (e.g.,
tier) - Choose a value (e.g.,
enterprise)
Tag Analysis
View tag distribution for an issue:- What percentage of errors are from
tier=enterprise? - Which
experiment_varianthas more errors? - Are errors correlated with certain
flag_*values?
Common Tag Patterns
Feature Rollout
Canary Deployments
Geographic Context
Performance Tiers
JavaScript Equivalent
While Python hasset_tag(), in JavaScript you achieve similar functionality with extra:

