-
Notifications
You must be signed in to change notification settings - Fork 36
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
Conversation
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"; |
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.
The extension also allows for DD_LOCAL_TEST=1
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.
Fixed – but this shouldn't ever have been done and should be removed.
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.
I would like to see us stay consistent across repos and support DD_LOCAL_TEST=1
as a valid option.
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
What does this PR do?
Removes the call to
/flush
, as the telemetry-api tells us this information nowFixes #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
Check all that apply