-
Notifications
You must be signed in to change notification settings - Fork 897
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
Add ForceFlush to Tracing SDK #1452
Add ForceFlush to Tracing SDK #1452
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.
Thank you!
Co-authored-by: Christian Neumüller <[email protected]>
Overall good, but I suggest we wait for next Tuesday to discuss it (given the historical fear of adding this kind of functionality). |
Observation: despite being in the SDK spec, this PR proposes a change to TraceProvider, which is a part of the API, and it is a breaking change (adding methods to interface breaks existing implementations of that interface). While it is fine to add new methods to concrete SDK classes implementing TraceProvider, this change is very easy to misinterpret. Also, it is not clear how the end user is supposed to interact with this functionality - the flush won't be available at the API level. |
No, it does not. It proposes to add this to the SDK implementation class of the TracerProvider. The same applies to Shutdown. |
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.
Thank you!
This is a public api for the SDK implementation of the TraceProvider, but it is not an "interface" and even if it is we do not expect others to implement the SDK interfaces that we have (only for the API we guarantee that). |
Co-authored-by: Christian Neumüller <[email protected]>
Co-authored-by: Bogdan Drutu <[email protected]>
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.
+1. We already recommend ForceFlush for ephemeral situations like CloudRun.
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 do you still have a concern?
Just to make it clear: interfaces that the SDK must implement (such as Interfaces that define the interaction between the API and SDK can be modified by us. There is no expectation that the end user implements a Note 1: we have a requirement that newer versions of the SDK package must work correctly with older versions of the API packages, so we cannot do arbitrary changes to the interfaces between API and SDK. From the perspective of the API the callable interface of the SDK is guaranteed to be backwards compatible. Likewise SDK's interfaces that are intended to be called by the end user have the exact same requirement: the may evolve in a way that remains callable with the existing end-user code without changing anything in the end-user code. Adding Note 2: interfaces that are intended to be implemented by the end user (for example |
@bogdandrutu and I wrote a few words about that on #1454. Since comments on a merged PR are hard to notice but I think this is an important topic, I will open a new issue for that. EDIT: I created #1457 "Interface stability for implementers" |
@tigrannajaryan also note that this PR does not even modify the |
* Update sdk.md * Update CHANGELOG.md * Update spec-compliance-matrix.md * Update CHANGELOG.md Co-authored-by: Christian Neumüller <[email protected]> * Update specification/trace/sdk.md Co-authored-by: Christian Neumüller <[email protected]> * Update specification/trace/sdk.md Co-authored-by: Bogdan Drutu <[email protected]> Co-authored-by: Christian Neumüller <[email protected]> Co-authored-by: Bogdan Drutu <[email protected]> Co-authored-by: Bogdan Drutu <[email protected]>
Fixes #1451
Changes
Added
ForceFlush
to Tracing SDK like it was done for theShutdown
method.