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

[serverless] Configure logs/core agent to respect datadog.yaml #11269

Merged
merged 8 commits into from
Mar 21, 2022

Conversation

DarcyRaynerDD
Copy link
Contributor

@DarcyRaynerDD DarcyRaynerDD commented Mar 11, 2022

What does this PR do?

Fixes a bug in the Datadog Lambda Extension, that was causing datadog.yaml to be incorrectly loaded.

Motivation

It appears this code was refactored out by mistake:
11e6514#diff-80867e42400e0fcf41760721c1e7bf703a1064d0636bfe72007834f0f21f7475L219

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the config template has been updated.

@DarcyRaynerDD DarcyRaynerDD requested a review from a team as a code owner March 11, 2022 19:49
@nhinsch
Copy link
Contributor

nhinsch commented Mar 11, 2022

Can we add a test to make sure the issue does not re-occur?

@DarcyRaynerDD
Copy link
Contributor Author

Can we add a test to make sure the issue does not re-occur?

I'm going to add a datadog.yaml to an integration test, with log obfuscation enabled. I think that will be the best way to test it.

@@ -9,7 +9,8 @@ async function myHandler(event, context) {
await sleep();
console.error("XXX LOG 2 XXX");
await sleep();

console.error("XXX LOG M12345M XXX");
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest replacing M12345M with something like IF THIS STRING APPEARS IN A SNAPSHOT, MASKING IS NOT WORKING so that it's easier to see in a diff what the expected behavior is.

Copy link
Contributor

@nhinsch nhinsch left a comment

Choose a reason for hiding this comment

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

Looks good, just one suggestion!

@DarcyRaynerDD DarcyRaynerDD merged commit 87e4c80 into main Mar 21, 2022
@DarcyRaynerDD DarcyRaynerDD deleted the darcy.rayner/fix-serverless-config branch March 21, 2022 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants