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

SDK span no modification after ended #1543

Merged
merged 5 commits into from
Feb 17, 2021
Merged

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Feb 17, 2021

This completes the last few details of #1313. Most of the work was completed in #1360

  • Update the End method to not modify anything if the span is not being recorded.
  • Remove redundant nil check in SetStatus.
  • Add recording to check to SetName.
  • Document the exported API of the (albeit unexported) span, being sure to include when no action is performed because the span is not being recorded.

Resolves #1313

@MrAlias MrAlias self-assigned this Feb 17, 2021
@MrAlias MrAlias added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Feb 17, 2021
@codecov
Copy link

codecov bot commented Feb 17, 2021

Codecov Report

Merging #1543 (ce719de) into main (7de3b58) will not change coverage.
The diff coverage is 50.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #1543   +/-   ##
=====================================
  Coverage   78.0%   78.0%           
=====================================
  Files        127     127           
  Lines       6590    6590           
=====================================
  Hits        5146    5146           
  Misses      1200    1200           
  Partials     244     244           
Impacted Files Coverage Δ
sdk/trace/span.go 91.4% <50.0%> (ø)

@MrAlias MrAlias merged commit 7d0e3e5 into open-telemetry:main Feb 17, 2021
@MrAlias MrAlias deleted the doc-sdk branch February 17, 2021 14:41
ldelossa pushed a commit to ldelossa/opentelemetry-go that referenced this pull request Mar 5, 2021
* Document SDK span ending stops recording

* Guard SDK span set methods with record check

* Document SDK span exported API

Make note of methods that do nothing if span is not recording.

* Document SDK span End recording check

* Document the SetName method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SDK Span updates should be ignored after End is called
3 participants