-
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.
Answered by
ahuigo
Nov 29, 2023
Replies: 1 comment 1 reply
-
I've solved this problem. SolutionRemove
The workround is: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ahuigo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've solved this problem.
Solution
Remove
registerInstrumentations
and create span with spanName and append tracing headers to fetch request manually like this: