-
Notifications
You must be signed in to change notification settings - Fork 143
MONIT-31965 Add debug level payload logging #813
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
Conversation
Add a logger in LogDataSubmissionTask and log a log message before it is sent to the backend.
Add a logger in LogDataSubmissionTask and log a log message before it is sent to the backend(if the root logger's level is defined as DEBUG).
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, property = "__CLASS") | ||
| public class LogDataSubmissionTask extends AbstractDataSubmissionTask<LogDataSubmissionTask> { | ||
| private static final Logger LOGGER = LogManager.getLogger(LogDataSubmissionTask.class); |
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.
Create a logger just for this.
wavefront-proxy/proxy/src/main/java/com/wavefront/agent/listeners/otlp/OtlpTraceUtils.java
Line 167 in 825e17e
| OTLP_DATA_LOGGER.finest(() -> "Inbound OTLP Resource: " + resource); |
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.
@laullon Can you please explain a little bit? Are you suggesting creating a logger just for the LogDataSubmissionTask.execute()? Is the OTLP_DATA_LOGGER just an example? If yes, I have another question. The LogDataSubmissionTask.java class does not have any other functionality like the OtlpTraceUtils.java class. Does it make sense to create a logger just for the execute() method? Please guide.
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.
@laullon please take a look again.
Fixing logger as per the PR comments.
|
Please make sure this change cam be apply to |
joannatk
left a comment
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
* dev: Add debug logging (#823) Fix for CVE-2022-3171 (#825) MONIT-32454 Update Dockerfile to create a directory (#822) Add 5 second timeout for PushAgent tests (#820) [release] prepare for next development iteration [release] prepare release for proxy-12.1 update open_source_licenses.txt for release 12.1 Update wavefront.conf.default (#819) Proxy V12.2 [MONIT-32096] Better Local Hostname detection (#817) changes for linux packages solve bug detected on v12.0 (#816) MONIT-31965 Add debug level payload logging (#813) deosu/monit 31993: add fluentBit support (#812) # Conflicts: # proxy/pom.xml # proxy/src/main/java/com/wavefront/agent/AbstractAgent.java # proxy/src/main/java/com/wavefront/agent/ProxyConfig.java
Add a logger in LogDataSubmissionTask and log a payload before it is sent to the backend(if the root logger's level is defined as DEBUG).