[
https://issues.apache.org/jira/browse/ARTEMIS-4655?focusedWorklogId=906949&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906949
]
ASF GitHub Bot logged work on ARTEMIS-4655:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 26/Feb/24 13:17
Start Date: 26/Feb/24 13:17
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #4830:
URL: https://github.com/apache/activemq-artemis/pull/4830#discussion_r1502597844
##########
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:
Given the broker as a whole is not really tied to Log4j2 (but rather SLF4J
API), it actually feels a little weird that this is. Especially as the broker
(or micrometer) has no [passed-on] dependency on Log4J2, so this wont work in
some cases. The config doc should perhaps be clearer that it is
Log4j2-specific, and perhaps note that such a dependency would need to be
provided if enabling this while e.g embedding / not using the distribution.
Issue Time Tracking
-------------------
Worklog Id: (was: 906949)
Time Spent: 20m (was: 10m)
> Report logging metrics
> ----------------------
>
> Key: ARTEMIS-4655
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4655
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> External systems (e.g. Prometheus & Grafana) can consume metrics to visualize
> and monitor the health and performance of the broker. These systems often
> support configurable alerts to inform administrators of problems (e.g. long
> GC pauses, message accumulation, etc.). It may be useful to configure alerts
> for {{ERROR}} or {{WARN}} events in the log which may go unnoticed otherwise.
> The
> [Log4j2Metrics.java|https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/logging/Log4j2Metrics.java]
> provided by Micrometer will report metrics for each logging category so
> administrators can see when unexpected events occur.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)