Skip to content

Conversation

@deosu
Copy link
Contributor

@deosu deosu commented Nov 21, 2022

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).

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).
@deosu deosu requested review from joannatk and laullon November 22, 2022 00:24
@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);
Copy link
Contributor

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.

OTLP_DATA_LOGGER.finest(() -> "Inbound OTLP Resource: " + resource);

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.
@laullon
Copy link
Contributor

laullon commented Nov 24, 2022

Please make sure this change cam be apply to dev_proxy2 branch, or create a new PR on that branch.

@deosu deosu requested a review from xuranchen November 30, 2022 15:43
Copy link
Contributor

@joannatk joannatk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deosu deosu merged commit 9ee1ea2 into dev Nov 30, 2022
@deosu deosu deleted the deosu/MONIT-31965 branch November 30, 2022 18:27
laullon added a commit that referenced this pull request Jan 24, 2023
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants