-
Notifications
You must be signed in to change notification settings - Fork 896
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
Remove lazy Event and Link API from Span interface #840
Remove lazy Event and Link API from Span interface #840
Conversation
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.
I am ok with this, we can decide to add later if we need because adding this new API should be backwards compatible.
@bogdandrutu I agree. In this case, if the language implementations that have already implemented this API don't remove it before GA, we would have to bring back the very same definition to avoid a breaking change, however. |
I agree, if we are not sure it is needed better to remove it from the spec now and we can add later if needed. |
@arminru are you suggesting to make everyone remove it? |
@bogdandrutu As mentioned above I'd leave that open as an implementation detail but if we later (re-)specify a lazy API it would either have to match the current implementation(s) or would constitute a breaking change (or a mess if both versions would be kept in parallel). If it's needed, just re-adding the current spec should be fine, however, so that will most likely not be an issue anyway. |
So I think we should recommend implementation to remove it for the moment unless it is too big of a problem. |
@arminru Java has that for example by implementing the Probably some others have the same. |
@@ -348,17 +348,10 @@ A `Link` is defined by the following properties: | |||
|
|||
The `Link` SHOULD be an immutable type. | |||
|
|||
The Span creation API should provide: | |||
The Span creation API MUST provide: |
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.
why does this say "Span creation"? This section looks like adding links to already created spans. Span creation is covered in previous section, L272.
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.
It just specifies in more detail how the API is supposed to look like (i.e., accepting both properties as arguments).
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.
@yurishkuro This is a subsection of that previous section (since links can only be created at span creation time).
@arminru Rebase on Monday (or next week), so we can merge (we have enough approvals, and all issues are solved, if I'm correct). |
@@ -348,17 +348,10 @@ A `Link` is defined by the following properties: | |||
|
|||
The `Link` SHOULD be an immutable type. | |||
|
|||
The Span creation API should provide: | |||
The Span creation API MUST provide: |
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.
@yurishkuro This is a subsection of that previous section (since links can only be created at span creation time).
Not to block this PR:
but pointed previously that this is not a correct statement. Does this change things here? |
@bogdandrutu Not to the PR itself, I think. |
@arminru I started to put a list of changes in the Maintainers list, so the owners are reminded of any recent change they need to make (e.g. |
@carlosalberto @bogdandrutu I added a more explicit note for the SIGs to the changelog in d8d6a21. |
@carlosalberto If we have an established process for assuring spec changes are reflected in implementations now, it would be nice if you could document that on open-telemetry/community#317 and close the issue. Thanks! |
As per spec change open-telemetry/opentelemetry-specification#840, removing lazy event api. Fixes open-telemetry#1032
* Remove lazy Event and Link API from Span interface * Recommend existing lazy API implementations to be removed in the changelog
The SDK only supports head-based sampling and spans expose an
IsRecording
flag. Checking this one is more effective in avoiding unnecessary work than building an event or link constructor that is lazily invoked, so the lazy API doesn't really help solving any use case. This also cleans up the API surface.Some (most?) language implementations haven't implemented this MUST/SHOULD requirement yet and will benefit from removing it from the spec. Those who have implemented it (I noticed that at least Python offers an
add_lazy_event
API) can either drop it or take the liberty to offer it as an improvement which would be an implementation detail. We could, however, also document it as an optional feature in the spec but IMHO that's not worth mentioning, I'd rather emphasize and encourageIsRecording
to be checked by users rather than pointing them to a lazy API. Happy to hear other opinions on this, however.I also noticed that the API to add links at span creation is specified as a
should
but the first sentence in that section says:Therefore I'm quite sure that this was actually intended as a MUST and fixed it along the way. I'll carve it out of this PR if it turns out to be controversial, however.
Also obsoletes #533.