feat: add HTTP client attributes to remote service#425
Conversation
SummaryThe following content is AI-generated and provides a summary of the pull request: feat: Add HTTP Semantic Convention Attributes to Remote Service SpansNew Feature✨ Enriches remote service spans with HTTP semantic convention attributes by wrapping Changes
PR Bot InformationVersion:
|
sjvans
left a comment
There was a problem hiding this comment.
should use instrumentation-http's hooks
@sjvans: The @opentelemetry/instrumentation-http hooks doesn't work with CDS. CDS uses fetch() and not the http module. That's why I initially decided to use the client wrapper. But actually @opentelemetry/instrumentation-undici solves the problem. The http attributes are now there by just including instrumentation into dependencies. |
Adds HTTP semantic convention attributes to remote service spans by wrapping
fetchClient.executeHttpRequest.Alternative considered: Using
@opentelemetry/instrumentation-undiciresponse hooks to propagate attributes from HTTP child spans. This approach was rejected as it requires an additional dependency and creates duplicate spans.