set phoenix attributes on span creation (#52)

This commit is contained in:
matthijsqd 2021-12-17 17:16:26 +01:00 committed by GitHub
parent eecb238cff
commit 9446655797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -122,8 +122,10 @@ defmodule OpentelemetryPhoenix do
] ]
# start the span with a default name. Route name isn't known until router dispatch # start the span with a default name. Route name isn't known until router dispatch
OpentelemetryTelemetry.start_telemetry_span(@tracer_id, "HTTP #{conn.method}", meta, %{kind: :server}) OpentelemetryTelemetry.start_telemetry_span(@tracer_id, "HTTP #{conn.method}", meta, %{
|> Span.set_attributes(attributes) kind: :server,
attributes: attributes
})
end end
@doc false @doc false