feat: Add showCustomAttribute filter config setting to include the CUSTOM attribute as tag/label #392
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.
Adds new
filters.showCustomAttribute
config setting to add the CUSTOM attribute data from a queue manager or queue as metrics tag/label.Please ensure all items are complete before opening.
What
We have the requirement to annotate queue manager and queue metrics with a custom tag or label. This information helps query the metrics based on this custom label and create alerts based on this information.
The CUSTOM attribute on queue manager and queue level can be utilized for this kind of additional information. As an IBM MQ platform team we will set
CUSTOM("APP(A0123)")
on a queue manager or on a queue. The new capability in this PR extracts this CUSTOM data and adds it as a tag or label depending on the collector.How
The query request of the queue manager and queue attributes was extended to include the
ibmmq.MQCA_CUSTOM
data.Testing
The change was tested locally for otel, prometheus and JSON exporter.
Issues
Open point
[mq-golang](https://github.com/ibm-messaging/mq-golang)
were commited to the vendor folder as it's not clear how to bring the changes upstream. Should a pull request opened at mq-golang?showAndSupportsCustomLabel
method was created to mark it false if the platform does not support it.