Skip to content

QServer metrics: use ISOServer's activeConnections#670

Merged
ar merged 1 commit intojpos:mainfrom
barspi:metrics-qserever
Jan 24, 2026
Merged

QServer metrics: use ISOServer's activeConnections#670
ar merged 1 commit intojpos:mainfrom
barspi:metrics-qserever

Conversation

@barspi
Copy link
Contributor

@barspi barspi commented Jan 23, 2026

QServer was producing the metric:
ISOSERVER_CONNECTION_COUNT("jpos.server.connections", "Incoming active connections")

with a unit of THREADS (prometheus full name jpos_server_connections_threads{....})

This was actually using ISOServer's getConnectionCount(), which returns the historical total count (ever increasing, unless resetCounters() is explicitly called by someone) and not the count of currently active connextions.

The active connection count is both more useful and matches the HELP description of "Incoming active connections".

Also, the suffix/units of THREADS wasn't conveying useful info, and would leak implementation details.
We noticed that ChannelAdaptor is using BaseUnits.SESSIONS.

This PR attempts to fix both issues:

  • returns the number of active connections
  • It returns a metric with _sessions suffix, to align it with ChannelAdaptor semantics.

An example:

# HELP jpos_server_connections_sessions Incoming active connections
# TYPE jpos_server_connections_sessions gauge
jpos_server_connections_sessions{name="my-server",type="server"} 1.0

NOTE: some current Grafana dashboards may need to be adapted to the new name.

@ar ar merged commit a9ec777 into jpos:main Jan 24, 2026
2 checks passed
@barspi barspi deleted the metrics-qserever branch January 25, 2026 03:36
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.

2 participants