Skip to content

Conversation

@BridgeAR
Copy link
Collaborator

@BridgeAR BridgeAR commented Jan 19, 2026

This addresses multiple baggage issues and adds further documentation to the new implementation.
The regular API is now spec compliant by ignoring non string keys as well as returning the new context consistently when needed.

Baggage headers are also improved by not accepting arbitrary strings as keys anymore. They now adhere to the spec as outlined in the code comment.
In addition, the parsing now handles optional properties that may be attached.

TODO:
This is lacking additional tests for the improvements. Especially system tests should be used for the headers.

This addresses multiple baggage issues and adds further documentation
to the new implementation.
The regular API is now spec compliant by ignoring non string keys
as well as returning the new context consistently when needed.

Baggage headers are also improved by not accepting arbitrary strings
as keys anymore. They now adhere to the spec as outlined in the
code comment.
In addition, the parsing now handles optional properties that may
be attached.
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Overall package size

Self size: 4.41 MB
Deduped: 5.24 MB
No deduping: 5.24 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.0 | 68.46 kB | 797.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.37%. Comparing base (971bdd5) to head (398f1e0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7279      +/-   ##
==========================================
+ Coverage   85.14%   85.37%   +0.23%     
==========================================
  Files         532      316     -216     
  Lines       22897    12204   -10693     
==========================================
- Hits        19495    10419    -9076     
+ Misses       3402     1785    -1617     

☔ 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.

@datadog-official
Copy link

datadog-official bot commented Jan 19, 2026

⚠️ Tests

Fix all issues with Cursor

⚠️ Warnings

🧪 3 Tests failed

esbuild 0.27.0 "before all" hook for "works" from esbuild 0.27.0 (Datadog) (Fix with Cursor)
spawnSync /bin/sh ETIMEDOUT

Error: spawnSync /bin/sh ETIMEDOUT
    at Object.spawnSync (node:internal/child_process:1120:20)
    at spawnSync (node:child_process:902:24)
    at Object.execSync (node:child_process:983:15)
    at execSync (integration-tests/esbuild/index.spec.js:18:10)
    at Context.<anonymous> (integration-tests/esbuild/index.spec.js:37:7)
    at process.processImmediate (node:internal/timers:485:21)
esbuild 0.16.12 "after all" hook for "prints a warning when user opts to minify output without retaining class names" from ESM (Datadog) (Fix with Cursor)
spawnSync /bin/sh ETIMEDOUT

Error: spawnSync /bin/sh ETIMEDOUT
    at Object.spawnSync (node:internal/child_process:1117:20)
    at spawnSync (node:child_process:876:24)
    at Object.execSync (node:child_process:957:15)
    at execSync (integration-tests/esbuild/index.spec.js:18:10)
    at Context.<anonymous> (integration-tests/esbuild/index.spec.js:47:7)
    at process.processImmediate (node:internal/timers:476:21)
tests.parametric.test_headers_baggage.Test_Headers_Baggage_Span_Tags.test_baggage_span_tags_malformed_header[parametric-nodejs] from system_tests_suite (Datadog) (Fix with Cursor)
AssertionError: assert '' is None
 +  where '' = <built-in method get of dict object at 0x7f236352abc0>('baggage.user.id')
 +    where <built-in method get of dict object at 0x7f236352abc0> = {'_dd.integration': 'opentracing', '_dd.p.dm': '-0', '_dd.rc.client_id': 'f626f603-1dd2-450c-b2b1-b6711e432f82', 'baggage.account.id': 'abcd', ...}.get

self = <tests.parametric.test_headers_baggage.Test_Headers_Baggage_Span_Tags object at 0x7f2395a56480>
test_agent = <utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7f2360f08fb0>
test_library = <utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7f23610ff9b0>

    def test_baggage_span_tags_malformed_header(self, test_agent: TestAgentAPI, test_library: APMLibrary) -> None:
        with test_library:
...

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 398f1e0 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Jan 20, 2026

Benchmarks

Benchmark execution time: 2026-01-20 02:16:09

Comparing candidate commit 398f1e0 in PR branch BridgeAR/2026-01-19-improve-baggage with baseline commit 971bdd5 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 230 metrics, 30 unstable metrics.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants