Skip to content

Commit

Permalink
Add dns to default list of disabled instrumentations (#33)
Browse files Browse the repository at this point in the history
*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
  • Loading branch information
jj22ee authored Aug 23, 2024
1 parent c4cd960 commit affc3e7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export function setAwsDefaultEnvironmentVariables(): void {
if (!process.env.OTEL_PROPAGATORS) {
process.env.OTEL_PROPAGATORS = 'xray,tracecontext,b3,b3multi';
}
// Disable `@opentelemetry/instrumentation-fs` instrumentation by default
// This auto-instrumentation for the `fs` module would otherwise generate many low-value spans.
// Disable the following instrumentations by default
// This auto-instrumentation for the `fs` module generates many low-value spans. `dns` is similar.
// https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1344#issuecomment-1618993178
if (!process.env.OTEL_NODE_DISABLED_INSTRUMENTATIONS) {
process.env.OTEL_NODE_DISABLED_INSTRUMENTATIONS = 'fs';
process.env.OTEL_NODE_DISABLED_INSTRUMENTATIONS = 'fs,dns';
}
}
setAwsDefaultEnvironmentVariables();
Expand Down

0 comments on commit affc3e7

Please sign in to comment.