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

test(auto-instr-node): show result of setting both env vars #2325

Conversation

JamieDanielson
Copy link
Member

Which problem is this PR solving?

  • More clarity around what happens if both environment variables are set for enabling and disabling instrumentations

Short description of the changes

  • Add debug message describing disabled instrumentations if both OTEL_NODE_ENABLED_INSTRUMENTATIONS and OTEL_NODE_DISABLED_INSTRUMENTATIONS environment variables are both set.
  • Add test asserting that instrumentation is disabled when both environment variables are set.

Note this test is intended to show current state. If we want to change the behavior so that one wins over the other, that is an option, but is not the purpose of this PR.

OTEL_NODE_ENABLED_INSTRUMENTATIONS
and
OTEL_NODE_DISABLED_INSTRUMENTATIONS
environment variables are mutually exclusive.
All instrumentations are disabled when both are set.
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.40%. Comparing base (dfb2dff) to head (1f42b6d).
Report is 193 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2325      +/-   ##
==========================================
- Coverage   90.97%   90.40%   -0.57%     
==========================================
  Files         146      149       +3     
  Lines        7492     7371     -121     
  Branches     1502     1532      +30     
==========================================
- Hits         6816     6664     -152     
- Misses        676      707      +31     

see 63 files with indirect coverage changes

metapackages/auto-instrumentations-node/src/utils.ts Outdated Show resolved Hide resolved
metapackages/auto-instrumentations-node/src/utils.ts Outdated Show resolved Hide resolved
@blumamir blumamir merged commit 8bcb561 into open-telemetry:main Jul 23, 2024
19 checks passed
@JamieDanielson JamieDanielson deleted the jamie.add-test-for-enable-and-disable branch July 23, 2024 19:47
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.

7 participants