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

ddtrace/tracer: add Span.Tag function #2523

Merged
merged 5 commits into from Jan 31, 2024

Conversation

darccio
Copy link
Contributor

@darccio darccio commented Jan 19, 2024

What does this PR do?

Adds tracer.Span.Tag(key string) as part of its API to allow retrieving previously set tags.

Motivation

Simplify the error handling in cases like #2432 where our contribs may override already set errors.

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!

@darccio darccio requested a review from a team as a code owner January 19, 2024 15:50
ddtrace/tracer/span.go Outdated Show resolved Hide resolved
@darccio darccio marked this pull request as draft January 19, 2024 15:55
@darccio darccio marked this pull request as ready for review January 24, 2024 09:04
ddtrace/tracer/span.go Outdated Show resolved Hide resolved
ddtrace/tracer/span_test.go Show resolved Hide resolved
@rarguelloF rarguelloF self-requested a review January 31, 2024 11:47
Copy link
Contributor

@rarguelloF rarguelloF left a comment

Choose a reason for hiding this comment

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

LGTM!

@darccio darccio merged commit 6de4f6a into v2-dev Jan 31, 2024
151 of 152 checks passed
@darccio darccio deleted the dario.castane/AIT-9377/span-tag-function branch January 31, 2024 12:13
@darccio
Copy link
Contributor Author

darccio commented Apr 8, 2024

Reverting this PR to fix #2432 as it would collide with future developments. We'll reopen #2432 and find an alternative.

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

2 participants