Skip to content

Conversation

@ajgajg1134
Copy link
Contributor

What does this PR do?

Send "t" for the truth-y value for these http headers. No functional behavior change here. I picked "t" since it's small so there's a super micro optimization for ya (saved 4 bytes per payload 😎 )

Motivation

We use strconv.ParseBool in the trace-agent to read these headers, while it's true that we default to "true" when there's any non-empty value here that can't be parsed we do also log a debug message about it when we fail to parse a non-empty value. This is a super minor nitpick but it can make debug trace-agent logs very noisy when talking to the go tracer.

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 ./scripts/lint.sh 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!

@ajgajg1134 ajgajg1134 requested a review from a team as a code owner November 20, 2025 21:48
@ajgajg1134 ajgajg1134 changed the title Use a real true value for headers fix: Use a real true value for headers Nov 20, 2025
@pr-commenter
Copy link

pr-commenter bot commented Nov 20, 2025

Benchmarks

Benchmark execution time: 2025-11-21 18:21:58

Comparing candidate commit efb7071 in PR branch andrew.glaude/smallTrueFix with baseline commit cd74ff7 in branch main.

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

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