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

opentelemetry: refactor span links code for clarity #2538

Merged
merged 3 commits into from Feb 5, 2024

Conversation

katiehockman
Copy link
Contributor

@katiehockman katiehockman commented Feb 2, 2024

What does this PR do?

This change also includes a number of refactors, including some additional information about the trace flags.

Motivation

We should maintain some of the logic in the original PR when creating the DD span link: https://github.com/DataDog/dd-trace-go/pull/2396/files#diff-328a045c801a15647d453336c495d31dcd8016d29df86de478c77769d6792567

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.

For Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@katiehockman katiehockman changed the title opentelemetry: retain trace flags value in OTel span link opentelemetry: refactor span links code for clarity Feb 2, 2024
@katiehockman katiehockman marked this pull request as ready for review February 2, 2024 17:59
@katiehockman katiehockman requested a review from a team as a code owner February 2, 2024 17:59
Copy link
Contributor

@mabdinur mabdinur left a comment

Choose a reason for hiding this comment

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

Left one question. Looks good to me! Thanks for catching these issues

ddtrace/opentelemetry/span_test.go Show resolved Hide resolved
@pr-commenter
Copy link

pr-commenter bot commented Feb 2, 2024

Benchmarks

Benchmark execution time: 2024-02-02 18:12:36

Comparing candidate commit 19cfab9 in PR branch katie.hockman/span-links with baseline commit bbbbd7a in branch main.

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

@katiehockman katiehockman enabled auto-merge (squash) February 5, 2024 16:27
@katiehockman katiehockman merged commit 42593ee into main Feb 5, 2024
153 of 154 checks passed
@katiehockman katiehockman deleted the katie.hockman/span-links branch February 5, 2024 16:35
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.

None yet

3 participants