Skip to content
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

Safely destructure numerical values when configuring Kafka Metrics #809

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

Hc747
Copy link
Contributor

@Hc747 Hc747 commented Aug 10, 2023

Related to:

Addresses the following:

05:06:46.307 [elastic-apm-shared] WARN  io.micrometer.core.instrument.internal.DefaultGauge - Failed to apply the value function for the gauge 'kafka.consumer.commit-id'. Note that subsequent logs will be logged at debug level.
java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')
	at io.micronaut.configuration.kafka.metrics.builder.KafkaMetricMeterTypeBuilder.lambda$build$0(KafkaMetricMeterTypeBuilder.java:137) ~[XXX.jar:?]
	at io.micrometer.core.instrument.Gauge.lambda$builder$0(Gauge.java:58) ~[XXX.jar:?]
	at io.micrometer.core.instrument.StrongReferenceGaugeFunction.applyAsDouble(StrongReferenceGaugeFunction.java:48) ~[XXX.jar:?]
	at io.micrometer.core.instrument.internal.DefaultGauge.value(DefaultGauge.java:53) ~[invoice.jar:?]
	at co.elastic.apm.agent.micrometer.MicrometerMeterRegistrySerializer.serializeMetricSet(MicrometerMeterRegistrySerializer.java:137) ~[?:?]
	at co.elastic.apm.agent.micrometer.MicrometerMeterRegistrySerializer.serialize(MicrometerMeterRegistrySerializer.java:90) ~[?:?]
	at co.elastic.apm.agent.micrometer.MicrometerMetricsReporter.run(MicrometerMetricsReporter.java:192) ~[?:?]
	at co.elastic.apm.agent.micrometer.MicrometerMetricsReporter.run(MicrometerMetricsReporter.java:145) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577) ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:358) ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at co.elastic.apm.agent.util.ExecutorUtils$2.run(ExecutorUtils.java:99) ~[?:?]

@sdelamo sdelamo merged commit 28a08d6 into micronaut-projects:master Aug 15, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants