-
Notifications
You must be signed in to change notification settings - Fork 893
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
Add filter configuration to log appender #5464
Comments
Can I work on this request ? |
|
@rahuldimri are you still up for this? Let me know if you still want to work on this story, I'll assign you. |
Yes let me give a try !! |
I was assuming this issue was about "appender name", so that you could configure one appender with the particular configuration that you want, and then ask the javaagent to pick up only logs that flow through that one appender? |
Indeed, I somehow missed that and got fixated on logger name instead 🙈 In that case, this feature will only concern javaagent logging instrumentations; when you're using library appenders you can already configure them however you want. How about a list-type configuration property named |
Can we use the same configuration in javaagent instrumentation? |
So is the thought here to instead automatically add/apply OpenTelemetryAppender wherever specific other appenders are applied? Or to instrument those appenders code and check appender name rather than instrumenting loggers? |
I'm thinking something like this could be nice. Then as a configuration property, you could set the appender name that you want the javaagent to capture from, and if that configuration property is set, the javaagent could suppress the general instrumentation and only instrument that specific appender. |
I'd think a set of appender names would be ideal -- a Set.contains() check should be cheap enough and allow maximum flexibility, e.g. to capture all of the data the original app routed to several different log files. |
Is there any progress on this issue recently? |
Hey @xiangtianyu , |
Is there any plan for this? Or is there any discussion about this? |
I believe none of the maintainers of this project have cycles to handle that. |
I'd suggest having the configuration be a "map", where key is logger name/prefix and value is min level to capture for that logger name/prefix |
I want to try this issue. Please assign to me. |
This is being worked on at the specification level now through a combination of
(and some followups will be needed still) |
Is your feature request related to a problem? Please describe.
Agent will instrument all log appenders so that all logs will be exported to collector. I just want to export logs on specified appenders.
Describe the solution you'd like
I think we can add configuration to filter exporting logs by appender name or log level. Configurations maybe like
otel.instrumentation.log.enabled-appender-names
.The text was updated successfully, but these errors were encountered: