What are tags?
Tags are short string labels you attach to runs to categorize and filter them. Each run supports up to 10 tags, and each tag must be a string between 1 and 128 characters long. We recommend prefixing tags with their type followed by an underscore or colon. For example,user_123456 or video:123.
Many great APIs, like Stripe, already prefix IDs with the type and an underscore — for example,
cus_123456 for a customer. Using the same convention with Trigger.dev tags makes them easy to
recognize.Adding tags to a run
There are two ways to add tags:- When triggering the run
- Inside the
runfunction usingtags.add()
When triggering
All trigger methods accept atags option:
Inside the run function
Usetags.add() to add tags after a run has started:
/trigger/my-task.ts
Propagating tags to child runs
Tags are not automatically inherited by child runs. You must pass them explicitly:/trigger/my-task.ts
Filtering runs by tags
In the dashboard
On the Runs page, open the filter menu, choose Tags, and start typing the tag name. Select it to restrict results to runs with that tag. You can add multiple tags to filter by more than one at once.Using runs.list()
Pass a tag filter (or an array of tags) to runs.list():
tag with any other supported filter — status, taskIdentifier, date ranges, and more. See the runs.list() reference for the full options.
Tag limits
| Constraint | Value |
|---|---|
| Max tags per run | 10 |
| Max tag length | 128 characters |
| Min tag length | 1 character |
User_123 and user_123 are treated as different tags.