next.js
370ba8d0 - [OTel] fix: Root span name should not include high cardinality URL (#75416)

Commit
227 days ago
[OTel] fix: Root span name should not include high cardinality URL (#75416) > HTTP span names SHOULD be {method} {target} if there is a (low-cardinality) target available. If there is no (low-cardinality) {target} available, HTTP span names SHOULD be {method}. Some root spans don't have the `next.route` name available. In that case, we used the `req.url` in the name. However, the OTel docs recommend using only the method if the target is high cardinality. Therefore, removed the usage of `req.url` in the name of root spans. x-ref: [OTel docs](https://opentelemetry.io/docs/specs/semconv/http/http-spans/#:~:text=HTTP%20span%20names%20SHOULD%20be%20%7Bmethod%7D%20%7Btarget%7D%20if%20there%20is%20a%20(low%2Dcardinality)%20target%20available.%20If%20there%20is%20no%20(low%2Dcardinality)%20%7Btarget%7D%20available%2C%20HTTP%20span%20names%20SHOULD%20be%20%7Bmethod%7D.) Related: https://github.com/vercel/next.js/discussions/59645 --------- Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com> Co-authored-by: JJ Kasper <jj@jjsweb.site>
Author
Parents
Loading