-
Notifications
You must be signed in to change notification settings - Fork 893
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 details to Asynchronous Gauge API #1703
Add details to Asynchronous Gauge API #1703
Conversation
Co-authored-by: Cijo Thomas <[email protected]>
Co-authored-by: Cijo Thomas <[email protected]>
Co-authored-by: Cijo Thomas <[email protected]>
observed. Individual language client SHOULD define whether this callback | ||
function needs to be reentrant safe / thread safe or not. | ||
|
||
The callback function SHOULD NOT take indefinite amount of time. If multiple |
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.
Are there any rules about how many times per-exporter this is called?
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 should be called once per export cycle. That is my understanding.
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 think we don't put restriction in the API spec. The SDK spec might put additional requirements/explanation.
I would say by default it follows what @bogdandrutu mentioned.
In some situation, the user might decide to collect the data at a higher frequency but report it on lower frequency (e.g. configure the SDK to gather the data from callbacks every 5 seconds, but only export the data every one minute - refer to #1432).
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.
But even if the user wants to do that, they need to schedule their own timer then. The valid SDK implementation should call the callback once every export cycle I think
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.
Maybe call it "collection" cycle for the moment. Until we define if collection cycle == exporter cycle.
Co-authored-by: Joshua MacDonald <[email protected]>
@jsuereth please comment if you still has concerns. Otherwise I will merge in a few hours |
@jsuereth if there are outstanding comments, let's resolve them as issues |
* add details to asynchronous gauge * Update specification/metrics/api.md Co-authored-by: Cijo Thomas <[email protected]> * Update specification/metrics/api.md Co-authored-by: Cijo Thomas <[email protected]> * Update specification/metrics/api.md Co-authored-by: Cijo Thomas <[email protected]> * Update specification/metrics/api.md Co-authored-by: Joshua MacDonald <[email protected]> Co-authored-by: Cijo Thomas <[email protected]> Co-authored-by: Joshua MacDonald <[email protected]> Co-authored-by: Sergey Kanzhelev <[email protected]>
Follow up #1617.
Changes
Added details to the Asynchronous Gauge instrument. In #1617 these were left as TODO.