-
Notifications
You must be signed in to change notification settings - Fork 11.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
[ISSUE #5678] Add logging exporter for metrics #6234
Conversation
@@ -376,12 +379,13 @@ public boolean isEnable() { | |||
} | |||
} | |||
|
|||
private MetricsExporterType metricsExporterType = MetricsExporterType.DISABLE; | |||
private MetricsExporterType metricsExporterType = MetricsExporterType.LOGGER; |
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.
Please do not change the default value.
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.
@aaron-ai Could you please approve running the ci? And we need to add a jul to sl4j bridge in aliyunmq/rocketmq-shaded-slf4j-api-bridge.
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.
Actually there is an official bridge from SLF4j, @lrybbs just try it out.
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.
Actually there is an official bridge from SLF4j, @lrybbs just try it out.
You are right, but we should make it compatible with shaded sl4j. Can you give some guide for @lrybbs?
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.
Since #5959 has been merge, the unshaded SLF4j is compatible with the shaded SLF4j we introduced now. This means that after using the jul-to-slf4j bridge, the logs can be automatically redirected to the shaded SLF4j.
Here is the related link you could refer to: https://stackoverflow.com/questions/9117030/jul-to-slf4j-bridge
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.
@aaron-ai Now, broker metrics and proxy metric could output to "rocketmqlogs" folder. Their names are "broker_metric.log" and "proxy_metric.log", respectively.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6234 +/- ##
=============================================
+ Coverage 43.18% 43.21% +0.02%
- Complexity 8851 8863 +12
=============================================
Files 1094 1094
Lines 77184 77230 +46
Branches 10070 10074 +4
=============================================
+ Hits 33334 33374 +40
- Misses 39684 39696 +12
+ Partials 4166 4160 -6 ☔ View full report in Codecov by Sentry. |
Now, broker metrics and proxy metric could output to "rocketmqlogs" folder. Their names are "broker_metric.log" and "proxy_metric.log", respectively.
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
I have completed the issue #5678 @ShadowySpirits , now broker and proxy could export metrics in terminal.