Closed lboynton closed 12 months ago
I was aware there were semantic attribute names, but not span names. I agree that it is good to follow specs as much as possible, but as we do not have any route
information, the span name would just be the method?
We could have an optional config parameter to get route information I guess?
Love to hear your thoughts (and your colleague/friend/other person who reviewed it)
Also..I forgot to mention there is the updateName
method on a span that would update the name, so it wouldn't require an entire postProcessor
setup just to change the name.
Going to close this for now, as it is easy to update the name at the moment. Let me know if you have strong feelings about doing this in the library, but having just a bunch of 'GET' as the name of all top level spans might be a bit too confusing?
The span naming is something I noticed as well. span.updateName
is a great suggestion for this 👍🏻 I've been using Hono and will probably be updating the span name to incorporate the route pattern rather than the incoming request path. I haven't put all that together yet though, so we'll see if it works out 😄
I don't fully agree with the OpenTelemetry conventions on this (I also find it confusing and non-descriptive), but I'd prefer following it anyway for consistency when adopting the package. I'm not strongly opinionated on it though and will likely be modifying the span names regardless; just sharing my thoughts 🙂
This came up in a review when I showed someone who is more knowledgeable than me on this subject a project using this library. Wondered what your thoughts were.
The Open Telemetry convention for HTTP spans says the following:
Currently the library sets the span name to
fetchHandler
, whereas the convention suggests it should be the HTTP method as it's an HTTP client. It's easy to change this with a post processor function but do you think the library should follow these conventions?