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

Update SpanSnapshot to use parent SpanContext #1748

Merged
merged 3 commits into from
Mar 30, 2021

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Mar 29, 2021

Having only the parent span ID and a separate field to communicate if the parent was remote does not provide a comprehensive view of the parent span nor is it an efficient way to transmit this information. Update the SpanSnapshot to have a Parent field that contains the parent span context. This field replaces the ParentSpanID and HasRemoteParent fields.

Additionally to this being an improvement to the functionality of the SDK, it also helps move towards having the SpanSnapshot implement the ReadonlySpan interface.

Part of #1380

Having only the parent span ID and a separate field to communicate if
the parent was remote does not provide a comprehensive view of the
parent span nor is it an efficient way to transmit this information.
Update the SpanSnapshot to have a `Parent` field that contains the
parent span context. This field replaces the ParentSpanID and
HasRemoteParent fields.
@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #1748 (4a9bb40) into main (604b05c) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #1748   +/-   ##
=====================================
  Coverage   78.0%   78.0%           
=====================================
  Files        132     132           
  Lines       6941    6944    +3     
=====================================
+ Hits        5417    5420    +3     
  Misses      1274    1274           
  Partials     250     250           
Impacted Files Coverage Δ
exporters/otlp/internal/otlptest/data.go 64.0% <100.0%> (+2.2%) ⬆️
exporters/otlp/internal/transform/span.go 98.1% <100.0%> (ø)
exporters/trace/jaeger/jaeger.go 93.5% <100.0%> (+<0.1%) ⬆️
exporters/trace/zipkin/model.go 98.6% <100.0%> (ø)
sdk/trace/span.go 90.3% <100.0%> (-0.1%) ⬇️

Copy link
Member

@paivagustavo paivagustavo left a comment

Choose a reason for hiding this comment

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

Not totally related to the PR itself but I see that there are other parts of the code that need some refactoring after the isRemote() change on the SpanContext just like this, are there any issue tracking them?

@MrAlias
Copy link
Contributor Author

MrAlias commented Mar 29, 2021

@paivagustavo there is this issue which is being addressed in this PR, but if you see other places where it needs to be refactored please do indeed open an issue or PR.

@MrAlias MrAlias added this to the RC1 milestone Mar 29, 2021
@MrAlias MrAlias self-assigned this Mar 29, 2021
@MrAlias MrAlias merged commit 97501a3 into open-telemetry:main Mar 30, 2021
@MrAlias MrAlias deleted the pspan-snapshot branch March 30, 2021 15:59
@MrAlias MrAlias mentioned this pull request Apr 23, 2021
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.

3 participants