Skip to content
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 max_client_conn metric #10033

Merged
merged 4 commits into from
Sep 6, 2021
Merged

Add max_client_conn metric #10033

merged 4 commits into from
Sep 6, 2021

Conversation

JordanP
Copy link
Contributor

@JordanP JordanP commented Sep 2, 2021

What does this PR do?

Add a new PGBouncer metric: max_client_conn

Motivation

So we can compute a percent of client conn used:
(cl_active + cl_waiting) / max_client_conn

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached

So we can compute a percent of client conn used:
(cl_active + cl_waiting) / max_client_conn
@JordanP JordanP requested a review from a team as a code owner September 2, 2021 14:27
@JordanP
Copy link
Contributor Author

JordanP commented Sep 2, 2021

@blaines @FlorianVeaux @hithwen fyi :)

@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #10033 (8b5d684) into master (5071fac) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Flag Coverage Δ
pgbouncer 90.45% <100.00%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@JordanP
Copy link
Contributor Author

JordanP commented Sep 6, 2021

@coignetp thanks for adding the appropriate labels.

It looks like a CI check failed, but I don't know why, error is:

Run DataDog/labeler@glob-all
Error: Error: Input required and not supplied: repo-token
Error: Input required and not supplied: repo-token

Looks like some github action may be missing some config.

Copy link
Contributor

@coignetp coignetp left a comment

Choose a reason for hiding this comment

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

Thank you for opening this PR! I just have a suggestion for readability

pgbouncer/datadog_checks/pgbouncer/pgbouncer.py Outdated Show resolved Hide resolved
@coignetp
Copy link
Contributor

coignetp commented Sep 6, 2021

@coignetp thanks for adding the appropriate labels.

It looks like a CI check failed, but I don't know why, error is:

Run DataDog/labeler@glob-all
Error: Error: Input required and not supplied: repo-token
Error: Input required and not supplied: repo-token

Looks like some github action may be missing some config.

It's expected, external contributors can't run this action, I applied the labels manually

@coignetp coignetp changed the title PGBouncer: add max_client_conn metric Add max_client_conn metric Sep 6, 2021
As suggested during review.

Co-authored-by: Paul <[email protected]>
@coignetp coignetp merged commit 7bf8327 into DataDog:master Sep 6, 2021
@coignetp coignetp mentioned this pull request Sep 6, 2021
4 tasks
@coignetp
Copy link
Contributor

coignetp commented Sep 6, 2021

@JordanP FYI this was was released in the integration version 3.1.0. It should be shipped in version 7.32.0 of the datadog agent, but you can already manually install it if needed following this guide https://www.datadoghq.com/blog/agent-integration-management/

Package name is datadog-pgbouncer==3.1.0

@JordanP
Copy link
Contributor Author

JordanP commented Sep 7, 2021

Excellent @coignetp ! Thank you so much !

@JordanP JordanP deleted the jordan-pgbouncer branch September 7, 2021 08:47
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.

2 participants