-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unify API Span Start/End Options #1108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace both with `SpanOption`. Add a unified `SpanConfig` to match and a `SpanConfigure` function to parse a `SpanConfig` from `SpanOption`s. Update all the related options to use new `SpanOption`s.
The SDK uses an internal clock for the current time that cannot be use if it does not know the time has not been set.
This preserves existing behavior.
Include SDK implementation specific information in the Tracer Start method and Span End method.
MrAlias
added
pkg:API
Related to an API package
area:trace
Part of OpenTelemetry tracing
release:required-for-ga
labels
Aug 28, 2020
Codecov Report
@@ Coverage Diff @@
## master #1108 +/- ##
========================================
- Coverage 77.2% 77.0% -0.2%
========================================
Files 133 132 -1
Lines 7113 6984 -129
========================================
- Hits 5492 5383 -109
+ Misses 1371 1359 -12
+ Partials 250 242 -8
|
MrAlias
requested review from
Aneurysm9,
evantorrie,
jmacd and
lizthegrey
as code owners
August 28, 2020 17:40
evantorrie
approved these changes
Aug 31, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks fine. Just some typo/wording nits.
Co-authored-by: ET <evantorrie@users.noreply.github.com>
Try for a less tautological comment.
evantorrie
approved these changes
Aug 31, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
jmacd
approved these changes
Sep 2, 2020
evantorrie
added a commit
to evantorrie/opentelemetry-go
that referenced
this pull request
Sep 10, 2020
* Unify API Span Start/End Options Replace both with `SpanOption`. Add a unified `SpanConfig` to match and a `SpanConfigure` function to parse a `SpanConfig` from `SpanOption`s. Update all the related options to use new `SpanOption`s. * No non-zero SpanConfig defaults The SDK uses an internal clock for the current time that cannot be use if it does not know the time has not been set. * Append attributes for WithAttributes This preserves existing behavior. * Add unit test for SpanConfigure * Propagate changes * Update append option documentation * Update testing comments * Move comments on guarantees to appropriate function * Add documentation for SDK methods Include SDK implementation specific information in the Tracer Start method and Span End method. * Add changes to Changelog * Apply suggestions from code review Co-authored-by: ET <evantorrie@users.noreply.github.com> * Update the SpanKind comment in the SpanConfig Try for a less tautological comment. Co-authored-by: ET <evantorrie@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
StartOption
andEndOption
in the trace API withSpanOption
.SpanConfig
to match and aSpanConfigure
function to parse aSpanConfig
fromSpanOption
s.func LinkedTo(sc SpanContext, attrs ...label.KeyValue) StartOption
withfunc WithLinks(links ...Link) SpanOption
. This is more consistent with our other option patterns and a cleaner function signature.Resolves #988
Part of #536