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

Move Utils#next_id and constants to Tracing::Utils #2463

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

delner
Copy link
Contributor

@delner delner commented Dec 3, 2022

What does this PR do?

Moves tracing-specific Core::Utils#next_id and Tracing::Span ID constants to Tracing::Utils.

Motivation

Eliminate co-dependency for span/trace ID generation, but moving ID generation behavior to the tracing library. This also eliminates dependency on loading & referencing a Span for ID generation (which is generally unnecessary.)

@delner delner added core Involves Datadog core libraries dev/refactor Involves refactoring existing components dev/internal Other internal work that does not need to be included in the changelog labels Dec 3, 2022
@delner delner requested review from marcotc and a team December 3, 2022 02:07
@delner delner self-assigned this Dec 3, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #2463 (88af816) into master (c213f61) will increase coverage by 0.00%.
The diff coverage is 99.07%.

@@           Coverage Diff           @@
##           master    #2463   +/-   ##
=======================================
  Coverage   98.02%   98.02%           
=======================================
  Files        1108     1110    +2     
  Lines       59756    59770   +14     
=======================================
+ Hits        58576    58591   +15     
+ Misses       1180     1179    -1     
Impacted Files Coverage Δ
lib/datadog/core/utils.rb 100.00% <ø> (+2.27%) ⬆️
spec/datadog/core/utils_spec.rb 98.27% <ø> (-0.36%) ⬇️
lib/datadog/tracing/utils.rb 93.75% <93.75%> (ø)
lib/datadog/opentracer/distributed_headers.rb 100.00% <100.00%> (ø)
lib/datadog/tracing/distributed/helpers.rb 100.00% <100.00%> (ø)
lib/datadog/tracing/sampling/rate_sampler.rb 100.00% <100.00%> (ø)
lib/datadog/tracing/span.rb 97.56% <100.00%> (-0.09%) ⬇️
lib/datadog/tracing/span_operation.rb 81.21% <100.00%> (+0.09%) ⬆️
lib/datadog/tracing/trace_operation.rb 98.88% <100.00%> (+<0.01%) ⬆️
...pec/datadog/opentracer/distributed_headers_spec.rb 100.00% <100.00%> (ø)
... and 12 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@delner delner merged commit d2fc40f into master Dec 5, 2022
@delner delner deleted the refactor/extract_utils_tracing_next_id branch December 5, 2022 16:42
@github-actions github-actions bot added this to the 1.8.0 milestone Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries dev/internal Other internal work that does not need to be included in the changelog dev/refactor Involves refactoring existing components tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants