-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[improve][misc] Upgrade log4j2 to 2.23.1 #22327
Conversation
Please update the LICENSE files too |
/pulsarbot rerun-failure-checks |
The CLI fails.
"packages" has been deprecated, please see apache/logging-log4j2@2fc1f32 Line 25 in 70c4003
@lhotari Do you have any suggestions? |
Perhaps we need to upgrade the Prometheus Java client to a recent version? @asafm any suggestions? |
It seems that I misunderstood your previous comment. I can see that the line which causes the warning is in the log4j2.yaml file, Line 25 in 70c4003
|
Looks like it is used for exposing counters of log entries: https://github.com/prometheus/client_java/blob/simpleclient/simpleclient_log4j2/src/main/java/io/prometheus/client/log4j2/InstrumentedAppender.java Lines 85 to 86 in 70c4003
Lines 140 to 141 in 70c4003
|
"package" has been deprecated, and Prometheus SDK requires a new implementation for logging the metric, please see https://logging.apache.org/log4j/2.x/manual/plugins.html.
Prometheus [email protected] is no longer updated, we need to migrate to the new SDK 1.1.0 from 0.16, but 1.1.0 doesn't include the log4j2 plugin, and we are introducing the otel to the Pulsar. #2735 introduces simpleclient_log4j2, do we really need this? I need some help here. |
Any updates? |
Ok guys, there was a lot of information thrown around here, and for me most of it was new.
The dependency includes a Log4j2 plugin, which adds a new
This Appender receives the logs (log events) and exposes metrics about them - how many logs per type, etc. In effect, it instruments Log4j2.
and then referenced to "forward" the logs to that appender so they can be counted.
You do need to verify the Prometheus log4j metrics are still exposed as double check. |
Signed-off-by: Zixuan Liu <[email protected]>
/pulsarbot rerun-failure-checks |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #22327 +/- ##
============================================
+ Coverage 73.57% 73.69% +0.11%
+ Complexity 32624 32390 -234
============================================
Files 1877 1885 +8
Lines 139502 139867 +365
Branches 15299 15320 +21
============================================
+ Hits 102638 103071 +433
+ Misses 28908 28832 -76
- Partials 7956 7964 +8
Flags with carried forward coverage won't be shown. Click here to find out more. |
Ping @lhotari |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Zixuan Liu <[email protected]>
Signed-off-by: Zixuan Liu <[email protected]>
Motivation
Keep up-to-date, and then upgrade the slf4j to 2.x.
Release notes: https://logging.apache.org/log4j/2.x/release-notes.html
Modifications
Configuration.status
fromINFO
toERROR
in thelog4j2.yaml
Configuration.packages
has been deprecated, the log4j2 prints the warn log, this breaks our test.simpleclient_log4j2
is no longer updated and doesn't provideLog4j2Plugins.dat
, we can only suppress this warn log.Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: