Skip to content

Commit

Permalink
Handle bandit start event with no conn (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryannaegele authored Nov 6, 2024
1 parent 3f43ca2 commit ad99e40
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ defmodule OpentelemetryBandit do
end
end

# error with no conn
def handle_request_start(_meta, _config) do
Tracer.start_span(:HTTP, %{kind: :server})
|> Tracer.set_current_span()
end

defp public_endpoint?(_conn, %{public_endpoint: true}), do: true

defp public_endpoint?(conn, %{public_endpoint_fn: {m, f, a}}) do
Expand Down

0 comments on commit ad99e40

Please sign in to comment.