Skip to content

[ibm-mq] Add expired message metric for IBM MQ queues#2809

Merged
jaydeluca merged 3 commits intoopen-telemetry:mainfrom
breedx-splk:issue-2788-expired-messages
May 6, 2026
Merged

[ibm-mq] Add expired message metric for IBM MQ queues#2809
jaydeluca merged 3 commits intoopen-telemetry:mainfrom
breedx-splk:issue-2788-expired-messages

Conversation

@breedx-splk
Copy link
Copy Markdown
Contributor

Resolves #2788. Slopvomited with codex.

I don't love that the metric type is gauge, but it's consistent with ibm.mq.uncommitted.messages as mentioned in the original issue. We should also probably give some follow-up consideration to the metric names, since committed and uncommitted could (in concept) just be attributes/dimensions on some ibm.mq.messages counter...but let's leave data model redesign for a follow-up PR effort, as demand calls for it.

Copilot AI review requested due to automatic review settings May 1, 2026 17:40
@breedx-splk breedx-splk requested a review from a team as a code owner May 1, 2026 17:40
@github-actions github-actions Bot requested a review from atoulme May 1, 2026 17:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_COUNT from MQCMD_INQUIRE_Q_STATUS and publish it as ibm.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.

Comment thread ibm-mq-metrics/docs/metrics.md
@jaydeluca jaydeluca added this pull request to the merge queue May 6, 2026
Merged via the queue into open-telemetry:main with commit 7c18a2f May 6, 2026
20 checks passed
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.

[ibm-jmx-metrics] Support reporting expired messages

4 participants