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 SpanProcessor::on_start take a mutable span #601

Merged
merged 2 commits into from Jul 23, 2021

Conversation

ramosbugs
Copy link
Contributor

As a side effect of #505, SpanProcessor::on_start callbacks are no
longer able to modify the span. The OpenTelemetry spec states that the
span parameter is a read/write span object. This PR introduces a breaking
change to restore adherence to the spec.

@ramosbugs ramosbugs requested a review from a team as a code owner July 23, 2021 08:30
ramosbugs added a commit to ramosbugs/opentelemetry-honeycomb-rs that referenced this pull request Jul 23, 2021
ramosbugs added a commit to ramosbugs/opentelemetry-honeycomb-rs that referenced this pull request Jul 23, 2021
ramosbugs added a commit to ramosbugs/opentelemetry-honeycomb-rs that referenced this pull request Jul 23, 2021
@codecov
Copy link

codecov bot commented Jul 23, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@197c388). Click here to learn what that means.
The diff coverage is 60.0%.

Impacted file tree graph

@@          Coverage Diff           @@
##             main    #601   +/-   ##
======================================
  Coverage        ?   55.0%           
======================================
  Files           ?     100           
  Lines           ?    8890           
  Branches        ?       0           
======================================
  Hits            ?    4895           
  Misses          ?    3995           
  Partials        ?       0           
Impacted Files Coverage Δ
opentelemetry/src/sdk/trace/provider.rs 81.8% <0.0%> (ø)
opentelemetry/src/sdk/trace/span_processor.rs 81.7% <50.0%> (ø)
opentelemetry/src/sdk/trace/tracer.rs 88.4% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 197c388...8181da2. Read the comment docs.

Copy link
Contributor

@TommyCpp TommyCpp left a comment

Choose a reason for hiding this comment

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

👍 Looks good! Thanks. This API may need further changes to allow implementation to keep a reference to the span. As stated in spec,

It SHOULD be possible to keep a reference to this span object and updates to the span SHOULD be reflected in it

@jtescher
Copy link
Member

@ramosbugs looks great thanks, @TommyCpp yeah looks like the spec wants that, I think it's fine for now as that's just a SHOULD at this point.

@jtescher jtescher merged commit 7037f71 into open-telemetry:main Jul 23, 2021
@ramosbugs
Copy link
Contributor Author

thank you both for the quick merge!

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

3 participants