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

feat: Skip the flush() call unless the DD_LOCAL_TEST env var is set #454

Merged
merged 5 commits into from
Dec 19, 2023

Conversation

astuyve
Copy link
Contributor

@astuyve astuyve commented Dec 18, 2023

What does this PR do?

Removes the call to /flush, as the telemetry-api tells us this information now

Fixes #452

Motivation

We'd like to remove this entirely but it's required for people using the extension in a local testing mode. We don't intend to further support local testing in this library at this time.

Testing Guidelines

Additional Notes

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)

@astuyve astuyve requested a review from a team as a code owner December 18, 2023 14:22
src/index.ts Outdated
@@ -365,6 +367,11 @@ function getConfig(userConfig?: Partial<Config>): Config {
config.captureLambdaPayloadMaxDepth = Number(getEnvValue(captureLambdaPayloadMaxDepthEnvVar, "10"));
}

if (userConfig === undefined || userConfig.localTesting === undefined) {
const result = getEnvValue(localTestingEnvVar, "false").toLowerCase();
config.localTesting = result === "true";
Copy link
Contributor

Choose a reason for hiding this comment

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

The extension also allows for DD_LOCAL_TEST=1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed – but this shouldn't ever have been done and should be removed.

Copy link
Contributor

@purple4reina purple4reina left a comment

Choose a reason for hiding this comment

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

I would like to see us stay consistent across repos and support DD_LOCAL_TEST=1 as a valid option.

@codecov-commenter
Copy link

codecov-commenter commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (761b3dc) 82.06% compared to head (7440d6e) 82.09%.

❗ Current head 7440d6e differs from pull request most recent head cde829b. Consider uploading reports for the commit cde829b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #454      +/-   ##
==========================================
+ Coverage   82.06%   82.09%   +0.03%     
==========================================
  Files          54       54              
  Lines        2180     2184       +4     
  Branches      507      509       +2     
==========================================
+ Hits         1789     1793       +4     
  Misses        329      329              
  Partials       62       62              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@astuyve astuyve requested a review from purple4reina December 19, 2023 01:10
@astuyve astuyve merged commit 436e37c into main Dec 19, 2023
@astuyve astuyve deleted the aj/fix-node20-fd-leak branch December 19, 2023 17:44
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.

bind EMFILE 0.0.0.0 errors with Node 20
5 participants