-
Notifications
You must be signed in to change notification settings - Fork 107
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
Checking for correct Behaviour in module_info/0 in API #135
Comments
Argh, yes, we should remove this check. |
Ok, something like this then: -spec set_default_tracer(tracer()) -> boolean().
set_default_tracer(Tracer) ->
persistent_term:put({?MODULE, default_tracer}, Tracer).
-spec set_tracer(atom(), tracer()) -> boolean().
set_tracer(Name, Tracer) ->
persistent_term:put({?MODULE, Name}, Tracer).
-spec set_default_meter(meter()) -> boolean().
set_default_meter(Meter) ->
persistent_term:put({?MODULE, default_meter}, Meter).
-spec set_meter(atom(), meter()) -> boolean().
set_meter(Name, Meter) ->
persistent_term:put({?MODULE, Name}, Meter). |
It can still check if the module exists, even if it doesn't depend on the tracer behaviour being there. |
I added a fix here #137 |
Thanks! I'll test it. |
Behaves as expected now. Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exploring things a little bit, I noticed that I can't set tracers when the
.beam
files are stripped in aprod
release, I think.There reason is the check for the correct Behaviour here:
opentelemetry-erlang/apps/opentelemetry_api/src/opentelemetry.erl
Line 376 in 618ccd4
The
module_info/0
call might look like this, giving an empty attributes list:Do you think this is a correct assessment, and is it a case that matters?
The text was updated successfully, but these errors were encountered: