davsclaus commented on code in PR #28729:
URL: https://github.com/apache/camel/pull/28729#discussion_r4452447623
##########
components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerExchangeEventNotifier.java:
##########
@@ -103,6 +112,17 @@ protected void doStart() throws Exception {
inflightRepository = getCamelContext().getInflightRepository();
+ // Register once at startup — backing value updated via AtomicLong on
each exchange
+ if (recordLastExchangeTimestamp) {
+ Meter meter = Gauge.builder(
+ MicrometerConstants.CAMEL_EXCHANGE_LAST_TIME_METER_NAME,
+ lastExchangeTimestampHolder,
+ AtomicLong::get)
+ .description("Last exchange processed time in milliseconds
since the Unix epoch")
+ .register(getMeterRegistry());
+
meterMap.put(MicrometerConstants.CAMEL_EXCHANGE_LAST_TIME_METER_NAME, meter);
Review Comment:
Please disregard this one. Several CamelContexts in the same application is
not a supported setup anymore (that was the old OSGi world), so the gauge does
not need the `camelContext` tag. No change needed here.
_Claude Code on behalf of Claus Ibsen._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]