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

make span context management public #967

Merged
merged 2 commits into from
Sep 3, 2021

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented Sep 2, 2021

Fixes #950

Changes

( raising PR #966 again with resolved review comments because of easycla issue with one of the commits in it cc @ThomsonTan )

Move span-context helper methods from trace::propagation to trace namespace. They are now treated as being in public api namespace. It's not possible to move them to Span API ( i.e, making them static within api::Span class ) as the complete implementation of DefaultSpan is not visible/available in that class.

This is how header structure looks like:

context/context.h - contains implementation for context data-structure logic
trace/tracer.h - span context management ( implicit )
trace/context.h - span context management ( explicit )

The implicit context management are still static methods in trace::tracer class to ensure not to introduce a breaking change, and at the same time remain specs compliant.

cc @jsuereth

@lalitb lalitb requested a review from a team September 2, 2021 06:26
@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #967 (fade70d) into main (7b1842b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #967   +/-   ##
=======================================
  Coverage   95.36%   95.36%           
=======================================
  Files         161      161           
  Lines        6780     6780           
=======================================
  Hits         6465     6465           
  Misses        315      315           
Impacted Files Coverage Δ
api/include/opentelemetry/trace/context.h 100.00% <100.00%> (ø)
...de/opentelemetry/trace/propagation/b3_propagator.h 93.45% <100.00%> (ø)
...entelemetry/trace/propagation/http_trace_context.h 93.66% <100.00%> (ø)
...i/include/opentelemetry/trace/propagation/jaeger.h 97.68% <100.00%> (ø)
...pi/test/trace/propagation/http_text_format_test.cc 100.00% <100.00%> (ø)
.../test/trace/propagation/jaeger_propagation_test.cc 98.15% <100.00%> (ø)

@ThomsonTan ThomsonTan merged commit 703576c into open-telemetry:main Sep 3, 2021
@lalitb lalitb mentioned this pull request Sep 17, 2021
3 tasks
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.

Helper methods for accessing Span directly from Context in Span API
3 participants