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/opentelemetry: add RWMutex to handle concurrent calls to setters #2521

Merged
merged 9 commits into from Jan 30, 2024

Conversation

darccio
Copy link
Contributor

@darccio darccio commented Jan 19, 2024

What does this PR do?

Fixes #2518.

Motivation

Making sure OTel spans can be used concurrently, as our tracer.Span.

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 11:05
@darccio darccio force-pushed the dario.castane/2518/fix-concurrent-setattributes branch from a3c3459 to 31e9e44 Compare January 19, 2024 11:15
@pr-commenter
Copy link

pr-commenter bot commented Jan 19, 2024

Benchmarks

Benchmark execution time: 2024-01-26 19:24:26

Comparing candidate commit d4bb929 in PR branch dario.castane/2518/fix-concurrent-setattributes with baseline commit a3176e0 in branch main.

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

@katiehockman
Copy link
Contributor

The changes look good to me, so I'll approve them. However, I made a couple of commits, so I'd like @dianashevchenko to look this over on Monday.

@katiehockman katiehockman enabled auto-merge (squash) January 30, 2024 15:22
@katiehockman katiehockman merged commit c527ccc into main Jan 30, 2024
153 of 154 checks passed
@katiehockman katiehockman deleted the dario.castane/2518/fix-concurrent-setattributes branch January 30, 2024 15:28
@darccio
Copy link
Contributor Author

darccio commented Jan 31, 2024

Thanks @katiehockman & @dianashevchenko!

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] fatal error: concurrent map writes (*span).SetAttributes
3 participants