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

Cause clause error in otel_telemetry.erl #320

Open
AndrewDryga opened this issue Apr 24, 2024 · 0 comments
Open

Cause clause error in otel_telemetry.erl #320

AndrewDryga opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AndrewDryga
Copy link

AndrewDryga commented Apr 24, 2024

Here is an issue we saw in our production logs:

Handler :opentelemetry_cowboy_handlers has failed and has been detached. Class=:error
Reason={:case_clause, []}
Stacktrace=[
  {:otel_telemetry, :peek_from_tracer_stack, 1,
   [file: ~c"src/otel_telemetry.erl", line: 99]},
  {:otel_telemetry, :set_current_telemetry_span, 2,
   [file: ~c"src/otel_telemetry.erl", line: 49]},
  {:opentelemetry_cowboy, :handle_event, 4,
   [
     file: ~c"/app/deps/opentelemetry_cowboy/src/opentelemetry_cowboy.erl",
     line: 53
   ]},
  {:telemetry, :"-execute/3-fun-0-", 4,
   [file: ~c"/app/deps/telemetry/src/telemetry.erl", line: 160]},
  {:lists, :foreach_1, 2, [file: ~c"lists.erl", line: 1686]},
  {:cowboy_metrics_h, :terminate, 3,
   [file: ~c"/app/deps/cowboy/src/cowboy_metrics_h.erl", line: 302]},
  {:cowboy_stream, :terminate, 3,
   [file: ~c"/app/deps/cowboy/src/cowboy_stream.erl", line: 138]},
  {:cowboy_http, :stream_call_terminate, 4,
   [file: ~c"/app/deps/cowboy/src/cowboy_http.erl", line: 1391]}
]

It only happened twice in the last week so there must be some rare edge case we need to handle.

Deps used:

❯ mix deps | grep opentelemetry
* opentelemetry 1.4.0 (Hex package) (rebar3)
  locked at 1.4.0 (opentelemetry) 50b32ce1
* opentelemetry_api 1.3.0 (Hex package) (mix)
  locked at 1.3.0 (opentelemetry_api) b9e5ff77
* opentelemetry_cowboy 0.3.0 (Hex package) (rebar3)
  locked at 0.3.0 (opentelemetry_cowboy) 4f44537b
* opentelemetry_ecto 1.2.0 (Hex package) (mix)
  locked at 1.2.0 (opentelemetry_ecto) 70dfa2e7
* opentelemetry_exporter 1.7.0 (Hex package) (rebar3)
  locked at 1.7.0 (opentelemetry_exporter) d0f25f64
* opentelemetry_finch 0.2.0 (Hex package) (mix)
  locked at 0.2.0 (opentelemetry_finch) 7364f708
* opentelemetry_liveview 1.0.0-rc.4 (Hex package) (mix)
  locked at 1.0.0-rc.4 (opentelemetry_liveview) e06ab69d
* opentelemetry_logger_metadata 0.1.0 (Hex package) (mix)
  locked at 0.1.0 (opentelemetry_logger_metadata) 772976d3
* opentelemetry_phoenix 1.2.0 (Hex package) (mix)
  locked at 1.2.0 (opentelemetry_phoenix) acab991d
* opentelemetry_process_propagator 0.3.0 (Hex package) (mix)
  locked at 0.3.0 (opentelemetry_process_propagator) 7243cb6d
* opentelemetry_semantic_conventions 0.2.0 (Hex package) (mix)
  locked at 0.2.0 (opentelemetry_semantic_conventions) d61fa1f5
* opentelemetry_telemetry 1.0.0 (Hex package) (mix)
  locked at 1.0.0 (opentelemetry_telemetry) 3401d13a

Versions:

elixir -v
Erlang/OTP 26 [erts-14.2.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Elixir 1.16.2 (compiled with Erlang/OTP 26)
@AndrewDryga AndrewDryga added the bug Something isn't working label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant