Skip to content

Conversation

@AlexisMontagne
Copy link
Member

What does this PR do?

In an effort to find potential contention in our infrastructure i have been instrumenting different pools (connection pool to the DB, thrift client pool...).

One issue arise in that kind of scenario, if there is multiple pool with similar labels it makes the data worth less to be analyzed.

This stats.Scope wrapper automatically add a incarnation label that is incremented. So if two connection pool to the DB are opened metrics for both will be reported independently.

What are the observable changes?

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation
  • Properly labeled

Additional Notes

@AlexisMontagne AlexisMontagne self-assigned this Mar 25, 2025
@AlexisMontagne AlexisMontagne requested a review from a team as a code owner March 25, 2025 23:06
@AlexisMontagne AlexisMontagne requested review from FlorianRichardUPF and Sypheos and removed request for a team March 25, 2025 23:07
return micv.cv.WithLabels(
append(
vs,
strconv.Itoa(int(micv.registry.next(ck))),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
G115: integer overflow conversion uint -> int (gosec)

@AlexisMontagne AlexisMontagne merged commit 73cee13 into master Mar 26, 2025
4 of 5 checks passed
@AlexisMontagne AlexisMontagne deleted the am/multi-incaration branch March 26, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants