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.
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
[metrics] Force export census metrics on worker death #28547
[metrics] Force export census metrics on worker death #28547
Changes from 17 commits
3f2502b
695de2a
6a5dda1
a800128
c4dc617
7260bdb
0a76be8
235fc77
553cea9
cf3eabd
4bbc2f0
32f8267
b45ceba
42237f7
2c97709
e90eee2
ff96358
8e4bc91
6e5e988
4ec8ef5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Unrelatedly, it seems 5 seconds is probably safe for now.
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.
Is this method thread safe?
Also, technically this can lose data because ExportNow() is not a blocking call (so if metrics_agent_io_service stops before we send a RPC, it can lose data). I guess the probably is low, and it might be okay.
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.
Yes, I checked here and OCL acquires a mutex internally.
Regarding the RPC safety, I think at least the RPC initiation is a blocking call. I'm not sure if we wait for a reply though.
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.
Ah, I see. If the initiation is a blocking call, I think it is pretty safe although we are not waiting for a reply...