-
Refer to this code (https://github.com/open-telemetry/opentelemetry-js/blob/main/examples/opentelemetry-web/examples/fetch/index.js), I've implement my own fetch request tracer. ProblemThe problem is that the default name of fetch span if HTTP {method}, e.g., QuestionQ: How to change fetch span name to api's url or url path? My codeI've tried this piece of code, it does not work.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I've solved this problem. SolutionRemove
The workround is: |
Beta Was this translation helpful? Give feedback.
I've solved this problem.
Solution
Remove
registerInstrumentations
and create span with spanName and append tracing headers to fetch request manually like this: