Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Support custom propagators in startup log #2925

Merged
merged 5 commits into from
Oct 18, 2024
Merged

Conversation

mtoffl01
Copy link
Contributor

@mtoffl01 mtoffl01 commented Oct 12, 2024

What does this PR do?

Modifies the logic within the startup log for determining values for propagation injectors and extractors.
Fixes #2923

Motivation

The previous logic expected to cast the current propagator to a *chainedPropagator, but that's not always viable, especially in the case that a custom propagator has been registered on the tracer via the WithPropagator StartOption.

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!

@pr-commenter
Copy link

pr-commenter bot commented Oct 12, 2024

Benchmarks

Benchmark execution time: 2024-10-18 15:15:44

Comparing candidate commit e0e305c in PR branch mtoff/fix-startup-log with baseline commit 93311db in branch main.

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

scenario:BenchmarkInjectW3C-24

  • 🟩 execution_time [-137.673ns; -109.127ns] or [-3.206%; -2.541%]

@mtoffl01 mtoffl01 marked this pull request as ready for review October 15, 2024 16:13
@mtoffl01 mtoffl01 requested a review from a team as a code owner October 15, 2024 16:13
@rarguelloF rarguelloF self-requested a review October 17, 2024 15:09
var stop func()
if customProp != nil {
tracer, _, _, stop = startTestTracer(t, WithLogger(tp), WithPropagator(customProp))
// tracer = newTracer(WithLogger(tp), WithPropagator(customProp))
Copy link
Member

Choose a reason for hiding this comment

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

nit: is this comment relevant?

The same for its sibling below.

@mtoffl01 mtoffl01 enabled auto-merge (squash) October 18, 2024 14:41
@mtoffl01 mtoffl01 merged commit f65cab8 into main Oct 18, 2024
144 of 145 checks passed
@mtoffl01 mtoffl01 deleted the mtoff/fix-startup-log branch October 18, 2024 17:31
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.

[BUG] Panic from v1.66 on startup
3 participants