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

add support for OTEL_SDK_DISABLED environment variable #574

Merged
merged 3 commits into from
Apr 19, 2023

Conversation

tsloughter
Copy link
Member

Resolves #573

setup_text_map_propagators(Config),

%% set global span limits record based on configuration
otel_span_limits:set(Config),
Copy link
Member Author

Choose a reason for hiding this comment

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

I reordered this because I was going to put a case Disabled around the parts that don't need to run if the SDK is disabled but then didn't because its not exactly required since the supervisor simply starts no children and that causes everything to fallback to no-ops.

Undecided.. Maybe I should check if its disabled here too and not do stuff like get_resource.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, I went ahead and added the check if sdk is disabled and skip the stuff below.

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Patch coverage: 92.30% and project coverage change: +0.05 🎉

Comparison is base (3bf392b) 38.05% compared to head (64fecd2) 38.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #574      +/-   ##
==========================================
+ Coverage   38.05%   38.11%   +0.05%     
==========================================
  Files          61       61              
  Lines        3592     3597       +5     
==========================================
+ Hits         1367     1371       +4     
- Misses       2225     2226       +1     
Flag Coverage Δ
api 67.91% <ø> (ø)
elixir 18.29% <ø> (ø)
erlang 38.09% <92.30%> (+0.05%) ⬆️
exporter 8.11% <ø> (ø)
sdk 78.13% <92.30%> (+0.01%) ⬆️
zipkin 54.16% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
apps/opentelemetry/src/otel_resource_detector.erl 86.00% <ø> (ø)
...pps/opentelemetry/src/otel_tracer_provider_sup.erl 87.50% <66.66%> (-12.50%) ⬇️
apps/opentelemetry/src/opentelemetry_app.erl 100.00% <100.00%> (ø)
apps/opentelemetry/src/opentelemetry_sup.erl 100.00% <100.00%> (ø)
apps/opentelemetry/src/otel_configuration.erl 79.33% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tsloughter tsloughter merged commit eafe427 into open-telemetry:main Apr 19, 2023
@tsloughter tsloughter deleted the sdk-disabled branch April 19, 2023 10:45
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.

[Question]: How to disable/enable tracer(s) in runtime
2 participants