gemmellr commented on code in PR #4830:
URL: https://github.com/apache/activemq-artemis/pull/4830#discussion_r1507420822
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/metrics/MetricsManager.java:
##########
@@ -86,6 +87,9 @@ public MetricsManager(String brokerName,
if (metricsConfiguration.isUptime()) {
new UptimeMetrics().bindTo(meterRegistry);
}
+ if (metricsConfiguration.isLogging()) {
+ new Log4j2Metrics().bindTo(meterRegistry);
+ }
Review Comment:
Not sure the new doc is clear enough / goes far enough. This thing actually
depends on Log4J API and Log4J Core, but neither the broker (no dep at all) or
micrometer core (optional dep) have a hard dep on them to bring them in...so
for anyone e.g embedding, it seems likely to blow up at this point unless some
other dep has actually brought in log4j-core. Our tests happen to do that and
so wont show any issue.
https://github.com/micrometer-metrics/micrometer/blob/v1.12.2/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/logging/Log4j2Metrics.java
##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin/LoggingMetricsTest.java:
##########
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * <br>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <br>
Review Comment:
Shouldnt have the <br> tags in the licence comment and the URL isnt indented
as it normally is. See most other java files in the codebase (and if using an
auto-insert, perhaps update it).
--
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]