-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add metric ibm_mq.channel.conns to ibm mq integration, add channel and connection metric tests #20519
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
Open
mwdd146980
wants to merge
26
commits into
master
Choose a base branch
from
mwdd146980/fragent-3166-channel-conns-metric
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8fe0745
to
290b3e5
Compare
- Update channel metric collector to use channel_status_metrics() instead of channel_metrics() for discovered channels to properly collect buffers_rcvd metric - Update test assertions to match actual tags being sent in gauge calls - Fix unit tests in test_channel_metric_collector.py to pass This change ensures that channel status metrics like buffers_rcvd are properly collected and reported by the integration.
- Updated get_pcf_channel_metrics to submit configuration metrics instead of status metrics. - Modified unit tests to verify that configuration metrics are collected for channels with empty or no connections. - Added a new test test_channel_status_metrics to ensure status metrics and connection metrics are correctly submitted.
buraizu
previously approved these changes
Jun 17, 2025
steveny91
reviewed
Jun 18, 2025
steveny91
reviewed
Jun 18, 2025
- create new metric ibm_mq.channel.connections_active which represents total num of active conns per channel
Review from buraizu is dismissed. Related teams and files:
- documentation
- ibm_mq/metadata.csv
5add087
to
3a5f791
Compare
buraizu
previously approved these changes
Jun 30, 2025
…annel.conn_status is only collected if this flag is enabled
Review from buraizu is dismissed. Related teams and files:
- documentation
- ibm_mq/assets/configuration/spec.yaml
- ibm_mq/datadog_checks/ibm_mq/data/conf.yaml.example
buraizu
previously approved these changes
Jul 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with a minor update requested
Co-authored-by: Bryce Eadie <[email protected]>
Review from buraizu is dismissed. Related teams and files:
- documentation
- ibm_mq/assets/configuration/spec.yaml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
This PR enhances the IBM MQ integration by adding two new metrics to provide better visibility into channel connections:
ibm_mq.channel.conn_status
(tracks individual connection status with connection name tags) andibm_mq.channel.connections_active
(counts total active connections per channel). These metrics enable customers to monitor individual channel connections, track connection counts per channel, and improve troubleshooting capabilities for IBM MQ connectivity issues.Configuration Control: To address potential tag cardinality concerns, this PR introduces a new configuration option
collect_connection_metrics
(default:false
) that allows users to control the collection of theibm_mq.channel.conn_status
metric. When enabled, this metric creates a newconnection
tag for each unique connection, which can lead to high cardinality in environments with many active connections. The option is disabled by default to prevent unintended tag cardinality issues.Additionally, this PR significantly enhances the test coverage for channel and connection metrics by:
Proper tagging of connection metrics
Motivation
The motivation behind this PR is to enhance the monitoring capabilities of the IBM MQ integration by providing visibility into active connections per channel. This feature allows users to track connection changes over time and identify which connections are active, which is crucial for maintaining the health and performance of the messaging system.
This was requested in escalation AGENT-13489/FRAGENT-3166 by customer Broadridge (GTO) (org ID: 345886).
Manual QA Steps
Ubu-ddev-docker
(required for the correct architecture)pytest tests/test_ibm_mq_unit.py -v
for unit testsddev --no-interactive test ibm_mq
for unit tests with ddev containersddev env start ibm_mq py3.12-9-cluster --dev
ddev env agent ibm_mq py3.12-9-cluster check
and check for the new metrics in the outputpython simulate_mq_conn.py QM1 DEV.ADMIN.SVRCONN localhost 11414 APP.QUEUE.1 "Conn 1"
Here's what it looked like in my own testing:

Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged