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

make TracerProvider simply implement a gen_server #298

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

tsloughter
Copy link
Member

The API defines the functions a user calls to interact with the
TracerProvider but the handling of the gen_server calls is done
in another module. In this case the other module is in the SDK
application.

otel_tracer_server registers itself with the name
otel_tracer_provider so it acts as the default global provider.

If multiple SDK's attempt to register as the default providers
startup will fail, by design.

The API defines the functions a user calls to interact with the
TracerProvider but the handling of the gen_server calls is done
in another module. In this case the other module is in the SDK
application.

otel_tracer_server registers itself with the name
otel_tracer_provider so it acts as the default global provider.

If multiple SDK's attempt to register as the default providers
startup will fail, by design.
@codecov
Copy link

codecov bot commented Oct 25, 2021

Codecov Report

Merging #298 (ed27b4a) into main (bc898b8) will decrease coverage by 0.04%.
The diff coverage is 81.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #298      +/-   ##
==========================================
- Coverage   37.25%   37.21%   -0.05%     
==========================================
  Files          46       46              
  Lines        3256     3249       -7     
==========================================
- Hits         1213     1209       -4     
+ Misses       2043     2040       -3     
Flag Coverage Δ
api 65.07% <100.00%> (+0.20%) ⬆️
elixir 14.52% <0.00%> (+0.28%) ⬆️
erlang 37.20% <81.25%> (-0.05%) ⬇️
exporter 19.75% <ø> (ø)
sdk 77.10% <62.50%> (-0.20%) ⬇️

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

Impacted Files Coverage Δ
apps/opentelemetry/src/opentelemetry_sup.erl 100.00% <ø> (ø)
apps/opentelemetry/src/otel_tracer_server.erl 78.78% <62.50%> (-3.98%) ⬇️
...pps/opentelemetry_api/src/otel_tracer_provider.erl 83.33% <100.00%> (+13.76%) ⬆️

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 bc898b8...ed27b4a. Read the comment docs.

@tsloughter tsloughter merged commit 2acb722 into open-telemetry:main Oct 26, 2021
@tsloughter tsloughter deleted the provider-behaviour branch October 26, 2021 20:46
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.

2 participants