Skip to content

[Refactor] Optimize baggage implementation#3439

Merged
mtoffl01 merged 4 commits into
mainfrom
mtoff/v2_baggage-perf-fix
Apr 16, 2025
Merged

[Refactor] Optimize baggage implementation#3439
mtoffl01 merged 4 commits into
mainfrom
mtoff/v2_baggage-perf-fix

Conversation

@mtoffl01

Copy link
Copy Markdown
Contributor

What does this PR do?

Cleans up the baggage implementation in propagatorBaggage.injectTextMap and propagatorBaggage.extractTextMap, as well as in httptrace.StartRequestSpan, for readability and performance

Motivation

Performance and readability!

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running golangci-lint run locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Apr 15, 2025

Copy link
Copy Markdown

Datadog Report

Branch report: mtoff/v2_baggage-perf-fix
Commit report: 4540037
Test service: dd-trace-go

✅ 0 Failed, 4480 Passed, 65 Skipped, 3m 49.38s Total Time

@pr-commenter

pr-commenter Bot commented Apr 15, 2025

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2025-04-16 15:22:47

Comparing candidate commit 8699138 in PR branch mtoff/v2_baggage-perf-fix with baseline commit 23a4bfe in branch main.

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

@mtoffl01
mtoffl01 marked this pull request as ready for review April 16, 2025 12:52
@mtoffl01
mtoffl01 requested review from a team as code owners April 16, 2025 12:52
@mtoffl01
mtoffl01 requested a review from rachelyangdog April 16, 2025 14:39
Comment thread ddtrace/tracer/textmap.go Outdated
@mtoffl01
mtoffl01 enabled auto-merge (squash) April 16, 2025 17:01
@mtoffl01
mtoffl01 merged commit 15004cf into main Apr 16, 2025
@mtoffl01
mtoffl01 deleted the mtoff/v2_baggage-perf-fix branch April 16, 2025 17:15
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.

3 participants