[ibm-mq] Add expired message metric for IBM MQ queues#2809
Merged
jaydeluca merged 3 commits intoopen-telemetry:mainfrom May 6, 2026
Merged
[ibm-mq] Add expired message metric for IBM MQ queues#2809jaydeluca merged 3 commits intoopen-telemetry:mainfrom
jaydeluca merged 3 commits intoopen-telemetry:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new IBM MQ queue metric to report expired message counts (issue #2788) and wires it through collection, configuration, tests, and documentation.
Changes:
- Collect
MQIACF_EXPIRY_Q_COUNTfromMQCMD_INQUIRE_Q_STATUSand publish it asibm.mq.expired.messages. - Add a new config toggle (
isIbmMqExpiredMessagesEnabled) and enable the metric in sample/test configs. - Update the metrics model + generated docs and extend the unit test expectations.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ibm-mq-metrics/src/main/java/io/opentelemetry/ibm/mq/metricscollector/InquireQStatusCmdCollector.java | Requests the additional PCF attribute for expiry/expired message count. |
| ibm-mq-metrics/src/main/java/io/opentelemetry/ibm/mq/metricscollector/QueueCollectionBuddy.java | Registers a new gauge mapping from MQIACF_EXPIRY_Q_COUNT to the new metric. |
| ibm-mq-metrics/src/main/java/io/opentelemetry/ibm/mq/metrics/Metrics.java | Defines the new ibm.mq.expired.messages gauge instrument. |
| ibm-mq-metrics/src/main/java/io/opentelemetry/ibm/mq/metrics/MetricsConfig.java | Adds enable/disable config plumbing for the new metric. |
| ibm-mq-metrics/src/test/java/io/opentelemetry/ibm/mq/metricscollector/QueueCollectionBuddyTest.java | Extends PCF request/response fixtures and assertions to cover the new metric. |
| ibm-mq-metrics/model/metrics.yaml | Adds the metric to the semantic model (name/unit/attributes). |
| ibm-mq-metrics/docs/metrics.md | Documents the new metric (generated doc output updated). |
| ibm-mq-metrics/config.yml | Enables the new metric in the example config (also includes a whitespace/indent adjustment). |
| ibm-mq-metrics/src/test/resources/conf/config.yml | Enables the new metric for unit tests. |
| ibm-mq-metrics/src/integrationTest/resources/conf/test-config.yml | Enables the new metric in integration test config. |
| ibm-mq-metrics/src/integrationTest/resources/conf/test-queuemgr-config.yml | Enables the new metric in integration test queue-manager config. |
atoulme
approved these changes
May 5, 2026
jaydeluca
approved these changes
May 6, 2026
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
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.
Resolves #2788. Slopvomited with codex.
I don't love that the metric type is gauge, but it's consistent with
ibm.mq.uncommitted.messagesas mentioned in the original issue. We should also probably give some follow-up consideration to the metric names, sincecommittedanduncommittedcould (in concept) just be attributes/dimensions on someibm.mq.messagescounter...but let's leave data model redesign for a follow-up PR effort, as demand calls for it.