-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[DoNotMerge] sdk: implementations to embed noop instead of embedded #6638
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
base: main
Are you sure you want to change the base?
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.
How do we provide an implementation of all methods? Before we would get a compilation error, now it will silently just provide a no-op.
Correct. This is the intention of this PR.
Users that want an implementation for new methods would need to bump to newer version of the SDK which has the new methods implemented. Do you have any other proposal? |
Right, but how do we know we have implemented all the known methods while we are developing? Before this change if I remove |
This feedback might also apply more generally. Do we really want users to be surprised when their telemetry doesn't show up the way they expect, or do we want to signal as soon as possible about the incompatibility of the SDK to implement the API fully? It seems like embedding the |
|
@MrAlias, your feedback makes totally sense. I think we should also get more feedback from end-users before making such change. Leaving the PR open for some time to encourage gathering feedback and adding "[Do not merge]" label. I am leaning towards closing the PR and referenced issue as "not planned". |
This makes sense to me, and resolves many stability concerns that were raised before. Regarding the full implementation question, how about adding a test checking that we implement noop? |
As someone who writes code, I can't say I like the noop / grpc Unimplemented style very much. As a consumer of the api, if I'm using the reference implementation in otel/sdk, I pretty much expect to not run in to silent / runtime failures from things being unimplemented, whether that's a new addition to an interface, or a new option that needs to be read / handled by the sdk. I don't really have an opinion on what other implementations do. While I understand why someone might want to allow version skew, IMO that should be explicit decisions handled and recorded through the standard go dependency constructs of replace and exclude directives, that is, they should be exceptional circumstances, and treated accordingly so. Consider for example the addition of histogram boundary hints. I think the only safe upgrade path should be sdk >= api, rather than api >= sdk, which is what this PR would promote. |
Fixes #6609
This allows users to use older versions of SDK and newer versions of API. This might be desired if e.g. newer versions of SDK has some bug or worse performance. This would also make bumping dependencies easier as bumping to a newer versions of API should not cause SDK compilation error.