Skip to content

tracer: allow x-datadog headers to pass as header tags#2744

Merged
mtoffl01 merged 3 commits intomainfrom
mtoff/header-tags
Jul 11, 2024
Merged

tracer: allow x-datadog headers to pass as header tags#2744
mtoffl01 merged 3 commits intomainfrom
mtoff/header-tags

Conversation

@mtoffl01
Copy link
Copy Markdown
Contributor

What does this PR do?

Allows x-datadog headers to be set as tags on http integrations with the header_tags feature

Motivation

Previously, the Go tracer would drop any headers prefixed with "x-datadog". Now that header_tags need to be explicitly included, there is no reason to drop x-datadog headers if they've been specified.
Allowing these headers as tags also assists with troubleshooting trace context propagation issues, see: Document

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.
  • 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!

@mtoffl01 mtoffl01 requested review from a team as code owners June 13, 2024 17:53
@github-actions github-actions Bot added the apm:ecosystem contrib/* related feature requests or bugs label Jun 13, 2024
Copy link
Copy Markdown
Member

@darccio darccio left a comment

Choose a reason for hiding this comment

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

LGTM

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Jul 10, 2024

Benchmarks

Benchmark execution time: 2024-07-11 14:28:57

Comparing candidate commit 9c358af in PR branch mtoff/header-tags with baseline commit e8dc974 in branch main.

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

scenario:BenchmarkHttpServeTrace-24

  • 🟩 allocations [-2; -2] or [-2.532%; -2.532%]
  • 🟩 execution_time [-491.671ns; -403.129ns] or [-2.980%; -2.443%]

@mtoffl01 mtoffl01 merged commit be3543a into main Jul 11, 2024
@mtoffl01 mtoffl01 deleted the mtoff/header-tags branch July 11, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants