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

Disable the fs module integration by default in the tracer #103

Merged
merged 7 commits into from
Oct 5, 2020

Conversation

Czechh
Copy link
Contributor

@Czechh Czechh commented Sep 29, 2020

What does this PR do?

  • Disables by default the fs module integration in dd-trace.
  • Removes http-errors from integration tests as they really don't provide a lot of value and timeout sporadically because they have an external dependency

In order to enable a user can set DD_TRACE_DISABLED_PLUGINS to '' otherwise it will be disabled by default.

Since the user can already disable other integration in the tracer using DD_TRACE_DISABLED_PLUGINS we make sure we don't overwrite the env var and only append to it if it exists.

Motivation

This confuses a lot of customers and the amount of data we log. This will decrease the number of support cases as well.

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)

@Czechh Czechh requested a review from a team as a code owner September 29, 2020 19:07
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2020

Codecov Report

Merging #103 into master will decrease coverage by 0.21%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #103      +/-   ##
==========================================
- Coverage   90.22%   90.01%   -0.22%     
==========================================
  Files          26       26              
  Lines         839      841       +2     
  Branches      142      143       +1     
==========================================
  Hits          757      757              
- Misses         54       56       +2     
  Partials       28       28              
Impacted Files Coverage Δ
src/handler.ts 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a6fb03...55e9bbd. Read the comment docs.

README.md Outdated
@@ -104,6 +104,10 @@ Inject Datadog trace id into logs for correlation. Defaults to `true`.

Set to `true` to merge the X-Ray trace and the Datadog trace, when using both the X-Ray and Datadog tracing. Defaults to `false`.

### DD_TRACE_DISABLED_PLUGINS
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is not directly supported by datadog-lambda, Should we simply add a paragraph about the environment variables that are honored by dd-trace and a link to that list? https://docs.datadoghq.com/tracing/setup/nodejs/#configuration

Copy link
Contributor Author

@Czechh Czechh Sep 29, 2020

Choose a reason for hiding this comment

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

Good call - removed this and added a paragraph in Trace (d93ca22)
2eb1892 (corrected)

README.md Outdated
@@ -26,6 +26,8 @@ For additional details on trace collection, take a look at [collecting traces fr

For additional details on trace and log connection, check out the [official documentation for Datadog trace client](https://datadoghq.dev/dd-trace-js/).

The `fs` module is disabled by default. If you want to enable it you have to set the environmental variable `DD_TRACE_DISABLED_PLUGINS` to `''` or to a comma separated list of the plugins you want to disable. See the full list of supported plugins [here](https://docs.datadoghq.com/tracing/compatibility_requirements/nodejs/).
Copy link
Contributor

Choose a reason for hiding this comment

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

environmental variable -> environment variable
comma separated list -> comma-separated list

@Czechh Czechh merged commit 4747521 into master Oct 5, 2020
@Czechh Czechh deleted the sergio.prada/disable-fs-plugin branch October 5, 2020 20:38
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.

4 participants