How to change span name for handle request spans? #59645
-
SummaryOpenTelemetry docs states, that span name should not contain variables to avoid high cardinality [1]. But NextJS uses a default span name like "GET /requested/pathname". I read the documentation [2] which states, that NextJS can use route patterns as a part of span tags and mentioned the same wording ("next route") for root span about handling requests.
Questions:
[1] https://github.com/open-telemetry/opentelemetry-specification/blob/v1.28.0/specification/trace/api.md#span next.js/packages/next/src/server/base-server.ts Lines 791 to 797 in 05eb811 Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
x-ref: OTel docs As the OTel docs recommend, changed the behavior at #75416 to use only the {method} if the available {target} is a high cardinality URL. Sorry for the late response, and thank you for reporting the issue! |
Beta Was this translation helpful? Give feedback.
x-ref: OTel docs
As the OTel docs recommend, changed the behavior at #75416 to use only the {method} if the available {target} is a high cardinality URL. Sorry for the late response, and thank you for reporting the issue!