thriftbp: Add a counter for opener calls in client pool #594
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.
We did some work previously to try to move dns out of hot path as much as possible in thrift client pool, by doing background refreshes, etc.. But there are always a (hopefully small) portion of client calls would still do dns on hot path, and we lack observability into how often that actually happens.
To get the precise data would require some breaking changes to clientpool package (to pass in required prometheus labels), so adding a counter to the opener call instead, which is the next best thing, as in we only need to ignore the spikes when a new pod comes up and need to fill in the initial clients when initialize a client pool.