Skip to content
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

Restrict the logic for trace detection in logs #519

Merged
merged 4 commits into from
Dec 21, 2021
Merged

Conversation

maxday
Copy link
Contributor

@maxday maxday commented Dec 15, 2021

What does this PR do?

  • Modify the logic to better discriminate a Datadog trace in logs
  • Add units tests around the modified function

Before : traces array was enough
After : traces array + first item of the array containing a 'trace_id' field

Now logs containing the trace keyword, which are NOT Datadog traces, are correctly logged.

Before:
Screen Shot 2021-12-15 at 12 52 32 PM
After:
Screen Shot 2021-12-15 at 12 53 47 PM

Motivation

Support ticket

Testing Guidelines

  • Unit testing
  • redeploy a forwarder in sandbox

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests

@maxday maxday requested a review from tianchu December 20, 2021 16:12
@tianchu tianchu merged commit cee80a6 into master Dec 21, 2021
@tianchu tianchu deleted the maxday/fix-trace-log branch December 21, 2021 16:29
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.

2 participants