Skip to content

Conversation

@alencardc
Copy link
Contributor

Fixes #73

When a new connection was opened, the mobc_pool_connections_opened_total metric was incremented as a gauge, and mobc_pool_connections_open was incremented as a counter. However, mobc_pool_connections_opened_total was described as a counter while mobc_pool_connections_open was described as a gauge. Simultaneously, mobc_pool_connections_open is decremented as a gauge when a connection is closed. Therefore,

  • mobc_pool_connections_opened_total was incorrectly registered as a gauge instead of a counter.
  • mobc_pool_connections_open was divided into two different metrics, where the gauge represented the negative number of closed connections, and the counter represented the total number of opened connections.

So, this PR increments mobc_pool_connections_opened_total as a counter and mobc_pool_connections_open as a gauge when a new pool connection is opened.

Copy link
Collaborator

@garrensmith garrensmith left a comment

Choose a reason for hiding this comment

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

@alencardc Nice catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metrics related to opened connections are registered incorrectly

2 participants