Skip to content

Use the generated code to drive the definition of the metric #2121

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Aug 15, 2025

A no-op change to rely on the generated code to take the definition of the gauge instead of duplicating this code.

@atoulme atoulme requested a review from a team as a code owner August 15, 2025 21:44
@github-actions github-actions bot requested a review from breedx-splk August 15, 2025 21:44
@@ -66,7 +67,7 @@ public WmqMonitor(ConfigWrapper config, ExecutorService threadPool, Meter meter)

this.metricsConfig = new MetricsConfig(config);

this.heartbeatGauge = meter.gaugeBuilder("ibm.mq.heartbeat").setUnit("1").ofLongs().build();
this.heartbeatGauge = Metrics.createIbmMqHeartbeat(meter);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code of that function:

    return meter
        .gaugeBuilder("ibm.mq.heartbeat")
        .ofLongs()
        .setUnit("1")
        .setDescription("Queue manager heartbeat")
        .build();

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.

2 participants