opentelemetry_phoenix http.status -> http_status_code (#42)
This commit is contained in:
parent
f21b315e3e
commit
3f43f8dd9f
|
@ -131,7 +131,7 @@ defmodule OpentelemetryPhoenix do
|
|||
# ensure the correct span is current and update the status
|
||||
ctx = OpentelemetryTelemetry.set_current_telemetry_span(@tracer_id, meta)
|
||||
|
||||
Span.set_attribute(ctx, :"http.status", conn.status)
|
||||
Span.set_attribute(ctx, :"http.status_code", conn.status)
|
||||
|
||||
if conn.status >= 400 do
|
||||
Span.set_status(ctx, OpenTelemetry.status(:error, ""))
|
||||
|
|
|
@ -65,7 +65,7 @@ defmodule OpentelemetryPhoenixTest do
|
|||
"http.method": "GET",
|
||||
"http.route": "/users/:user_id",
|
||||
"http.scheme": "http",
|
||||
"http.status": 200,
|
||||
"http.status_code": 200,
|
||||
"http.target": "/users/123",
|
||||
"http.user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0",
|
||||
"net.host.ip": "10.211.55.2",
|
||||
|
@ -155,7 +155,7 @@ defmodule OpentelemetryPhoenixTest do
|
|||
"http.method": "GET",
|
||||
"http.route": "/users/:user_id/exception",
|
||||
"http.scheme": "http",
|
||||
"http.status": 500,
|
||||
"http.status_code": 500,
|
||||
"http.target": "/users/123/exception",
|
||||
"http.user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0",
|
||||
"net.host.ip": "10.211.55.2",
|
||||
|
@ -223,7 +223,7 @@ defmodule OpentelemetryPhoenixTest do
|
|||
"http.method": "GET",
|
||||
"http.route": "/users/:user_id/exception",
|
||||
"http.scheme": "http",
|
||||
"http.status": 500,
|
||||
"http.status_code": 500,
|
||||
"http.target": "/users/123/exception",
|
||||
"http.user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0",
|
||||
"net.host.ip": "10.211.55.2",
|
||||
|
|
Loading…
Reference in New Issue