Skip to content

Adds tail attributes from caller to tail workers#6254

Merged
Caio-Nogueira merged 1 commit intomainfrom
caio/dyndispatch-tail-logs
Mar 17, 2026
Merged

Adds tail attributes from caller to tail workers#6254
Caio-Nogueira merged 1 commit intomainfrom
caio/dyndispatch-tail-logs

Conversation

@Caio-Nogueira
Copy link
Contributor

Adds tail tags to the Trace object and mirror these tags with attributes on the OnSet event

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 5, 2026

ResolveMessage: Cannot find module '@opencode-ai/plugin' from '/home/runner/work/workerd/workerd/.opencode/tools/bazel-deps.ts'

github run

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Mar 5, 2026

@Caio-Nogueira Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 9.57447% with 85 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.75%. Comparing base (bc0bc2a) to head (2425b02).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
src/workerd/api/trace.c++ 9.25% 49 Missing ⚠️
src/workerd/io/tracer.c++ 10.00% 26 Missing and 1 partial ⚠️
src/workerd/io/trace.c++ 0.00% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6254      +/-   ##
==========================================
- Coverage   70.80%   70.75%   -0.06%     
==========================================
  Files         420      420              
  Lines      112299   112391      +92     
  Branches    18417    18443      +26     
==========================================
+ Hits        79513    79520       +7     
- Misses      21789    21871      +82     
- Partials    10997    11000       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Caio-Nogueira Caio-Nogueira marked this pull request as ready for review March 10, 2026 13:57
@Caio-Nogueira Caio-Nogueira requested review from a team as code owners March 10, 2026 13:57
@Caio-Nogueira Caio-Nogueira force-pushed the caio/dyndispatch-tail-logs branch 4 times, most recently from d8eda22 to bb51205 Compare March 13, 2026 21:00
@Caio-Nogueira Caio-Nogueira force-pushed the caio/dyndispatch-tail-logs branch 3 times, most recently from e583699 to ad49500 Compare March 16, 2026 16:01
@Caio-Nogueira Caio-Nogueira force-pushed the caio/dyndispatch-tail-logs branch from ad49500 to 9aca7be Compare March 16, 2026 16:45
@Caio-Nogueira Caio-Nogueira requested a review from a team as a code owner March 16, 2026 16:45
@Caio-Nogueira Caio-Nogueira force-pushed the caio/dyndispatch-tail-logs branch from 9aca7be to 2425b02 Compare March 16, 2026 19:34
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR calls these "tail tags" but the code calls them "tail attributes". Is that just the PR being outdated or am I missing the connection?

@Caio-Nogueira Caio-Nogueira merged commit 980b36d into main Mar 17, 2026
24 of 25 checks passed
@Caio-Nogueira Caio-Nogueira deleted the caio/dyndispatch-tail-logs branch March 17, 2026 11:16
@Caio-Nogueira Caio-Nogueira changed the title Adds tail tags from caller to tail workers Adds tail attributes from caller to tail workers Mar 17, 2026
@Caio-Nogueira
Copy link
Contributor Author

The PR calls these "tail tags" but the code calls them "tail attributes". Is that just the PR being outdated or am I missing the connection?

Yeah, the PR description was outdated. We are using the term "tail attributes" for these tags now

for (const auto& value: tag.value) {
KJ_SWITCH_ONEOF(value) {
KJ_CASE_ONEOF(boolean, bool) {
tracker.trackFieldWithSize("tailAttributeValue", sizeof(boolean));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed – we don't do memory allocation for the given bool/double/integer types, and the type we have here (e.g. bool vs. double) doesn't matter since the size of tracing::Attribute is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants