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
OpentelemetryTelemetry.start_telemetry_span(@tracer_id, "HTTP #{conn.method}", meta, %{kind: :server})
|> Span.set_attributes(attributes)
OpentelemetryTelemetry.start_telemetry_span(@tracer_id, "HTTP #{conn.method}", meta, %{
kind: :server,
attributes: attributes
})
end
@doc false