Skip to content

opentelemetry_finch: "key :status not found in: {...}" #531

@DaemonSnake

Description

@DaemonSnake

Describe the bug
We recently added sentry to our project and are seeing, from time to time,
these exceptions popping up that seem to be a bug inside opentelemetry_finch.

key :status not found in: {{[
    [""] |
    "{\n  \"error\": {\n    \"code\": 403,\n    \"message\": \"Export only supports Docs Editors files.\",\n    \"errors\": [\n      {\n        \"message\": \"Export only supports Docs Editors files.\",\n        \"domain\": \"global\",\n        \"reason\": \"fileNotExportable\"\n      }\n    ]\n  }\n}\n"
  ], #Function<0.77863640/2 in Collectable.BitString.into/1>},
 %Req.Request{...}, %Req.Response{...}}
If you are using the dot syntax, such as map.field, make sure the left-hand side of the dot is a map

Expected behavior
Shouldn't cause an exception

Additional context

The call stack I found with this issues:

lib/opentelemetry_finch.ex in OpentelemetryFinch.handle_request_stop/4 at line 44
/app/deps/telemetry/src/telemetry.erl in anonymous fn/4 in :telemetry.execute/3 at line 167
lists.erl in :lists.foreach_1/2 at line 2310
/app/deps/telemetry/src/telemetry.erl in :telemetry.span/3 at line 327
lib/req/finch.ex in Req.Finch.finch_stream_into_collectable/5 at line 155
lib/req/request.ex in Req.Request.run_request/1 at line 1118
lib/req/request.ex in Req.Request.run/1 at line 1062
lib/req.ex in Req.request!/2 at line 1119

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions