-
Notifications
You must be signed in to change notification settings - Fork 150
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
Adds logback-classic-1.2 instrumentation #618
Adds logback-classic-1.2 instrumentation #618
Conversation
...-1.2/src/main/java/com/nr/agent/instrumentation/logbackclassic12/Logger_Instrumentation.java
Outdated
Show resolved
Hide resolved
Question for the agent folks -- is there already a shared way built in if we needed to disable this instrumentation, or do we need to add a specific configuration of some sort? |
Why shade another logging dependency instead of relying on simple java.util.logging? |
We focused on the Logback library since it is one of the most used, way above |
To clarify @dylanmei this is adding instrumentation for clients who use logback -- not using the library in the agent itself. |
Thanks! The overview is now much clearer. 😂 |
...-1.2/src/main/java/com/nr/agent/instrumentation/logbackclassic12/Logger_Instrumentation.java
Outdated
Show resolved
Hide resolved
Nothing special needs to be done. The
Is this instrumentation that we want enabled by default? |
...-1.2/src/main/java/com/nr/agent/instrumentation/logbackclassic12/Logger_Instrumentation.java
Outdated
Show resolved
Hide resolved
Great feedback @jasonjkeller! I definitely learned some new stuff.
Conversations internally have been that we will. Let's chat about it this week and we can loop back. There was also some internal conversation around naming that we should probably settle before we land anything here. |
FYI I've created a logging-initiative feature branch to merge PRs like this into and I've updated this PR to use that base instead of |
Hi @jasonjkeller! Comments from the review addressed on 5c73287, thanks for the review and the feedback on this! |
Overview
The following PR introduces instrumentation for the Logback logging framework. In particular, this instrumentation counts the amount of log lines emitted in total, as well as faceted by each of the log levels (DEBUG, INFO, etc.).
Note that this instrumentation doesn't simply count how many
logger.info()
calls have been performed, but how many log records have actually been accepted by the framework (that is, logs above the configured log level, and having been accepted by the turbofilters): we instrument thebuildLoggingEventAndAppend
method, which gets called when a log record has been accepted.Testing
Checks
[x] Are your contributions backwards compatible with relevant frameworks and APIs?
[x] Does your code contain any breaking changes? Please describe.
[x] Does your code introduce any new dependencies? Please describe.