OpenTelemetry Gradualization #474
Replies: 4 comments 15 replies
-
I'm also not sure what to do about this one :)
|
Beta Was this translation helpful? Give feedback.
-
This one might be an actual case of wanting to allow any user input but gradualizer, rightly, complaining that a clause can't be reached:
-spec inject(Context, Carrier, CarrierSetFun, Options) -> Carrier
when Context :: otel_ctx:t(),
Carrier :: otel_propagator:carrier(),
CarrierSetFun :: otel_propagator_text_map:carrier_set(),
Options :: b3multi | b3single.
inject(Ctx, Carrier, CarrierSet, Options=b3single) ->
otel_propagator_b3single:inject(Ctx, Carrier, CarrierSet, Options);
inject(Ctx, Carrier, CarrierSet, Options=b3multi) ->
otel_propagator_b3multi:inject(Ctx, Carrier, CarrierSet, Options);
inject(_Ctx, Carrier, _CarrierSet, _Options) ->
Carrier. I'm guessing for these what is needed is per-function ignore options like dialyzer, https://www.erlang.org/doc/man/dialyzer.html#suppression I might be able to do something similar to what was done before dialyzer supported this natively by putting them in the |
Beta Was this translation helpful? Give feedback.
-
I'm fine with adding the same for gradualizer: |
Beta Was this translation helpful? Give feedback.
-
This may be the last one. Code:
Error:
|
Beta Was this translation helpful? Give feedback.
-
This is about issues I'm hitting as I attempt to take care of all the errors from gradualizer in https://github.com/open-telemetry/opentelemetry-erlang
I'm opening this discussion to not flood the either issues or discussions with what often turn up to be my mistakes (like the last issue I opened and closed :). I usually catch myself before opening an issue but figure better to just open a discussion to centralize and I'll open issues if anything is actually found to be an issue.
The first one I'll start with is more a question of what can I do to silence it :). I get this error for concat:
Code in question: https://github.com/open-telemetry/opentelemetry-erlang/blob/main/apps/opentelemetry_experimental/src/otel_metric_reader.erl
When I'd get
too precise
errors elsewhere I could just use?assert_type(...)
, but here the type is a variable (not sure why the type it is looking for isn't a list?)Beta Was this translation helpful? Give feedback.
All reactions