improvement(triggers): add tags to all trigger.dev task invocations#3878
improvement(triggers): add tags to all trigger.dev task invocations#3878waleedlatif1 merged 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Extends async job enqueue options with Written by Cursor Bugbot for commit e76721c. Configure here. |
Greptile SummaryThis PR improves observability of trigger.dev task invocations across the codebase by adding structured Key changes:
Confidence Score: 5/5Safe to merge — all remaining findings are P2 style/cleanup suggestions that do not affect runtime behaviour. The changes are additive metadata enrichment with no risk to the execution paths themselves. The two P2 findings (unused apps/sim/lib/core/async-jobs/backends/trigger-dev.ts — unused parameter in Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Execution Call Site] --> B{Backend?}
B -->|TriggerDev| C[TriggerDevJobQueue.enqueue]
B -->|Direct tasks.trigger| D[Direct trigger call]
C --> E[buildTags - type, options]
E --> F[workspaceId tag]
E --> G[workflowId tag]
E --> H[userId tag]
E --> I[source / webhookId / scheduleId / provider tags]
E --> J[explicit options.tags - deduped]
F & G & H & I & J --> K[slice to 10 tags max]
K --> L[tasks.trigger - taskId, payload, tags]
D --> M[Inline tag array]
M --> L
subgraph Call Sites
N[workflow execute route] --> A
O[schedule execute route] --> A
P[webhook processor] --> A
Q[agentmail route] --> D
R[a2a push-notifications] --> D
S[logs/events] --> D
T[inactivity-polling] --> D
U[documents/service] --> D
V[sync-engine - DB lookup] --> D
end
|
Summary
workflowId:,workspaceId:,userId:) matching trigger.dev's recommended conventionbuildTagshelper in TriggerDevJobQueue that auto-derives tags from job metadata for workflow/schedule/webhook executionsworkspaceIdto JobMetadata and passed it from all execution call sitesType of Change
Testing
Tested manually
Checklist