Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance spans by adding Undici events as event spans #2539

Open
giliomix opened this issue Nov 19, 2024 · 0 comments
Open

Enhance spans by adding Undici events as event spans #2539

giliomix opened this issue Nov 19, 2024 · 0 comments

Comments

@giliomix
Copy link

giliomix commented Nov 19, 2024

I’d like to request an enhancement to the instrumentation-undici package.

Is your feature request related to a problem? Please describe

Currently, we lack visibility into the HTTP request lifecycle within spans when using the instrumentation-undici package. This limits our ability to observe and trace stages of HTTP requests using undici.

Describe the solution you'd like to see

  • Add undici:request:headers and undici:client:sendHeaders events on the relevant span.
  • Subscribe to the undici:request:bodySent event and also add it as event to the span.

Currently, the instrumentation-undici package subscribes to the undici:request:headers and undici:client:sendHeaders events via diagnostics_channel. However, these events are not being added as event spans to the corresponding spans.
Additionally, the undici:request:bodySent event is not yet subscribed to, but we can subscribe it and add it as an event span as well.
Without these events, the span lacks a detailed breakdown of the HTTP request lifecycle stages.

Additional context

Including these events as events in spans will enhance the observability of HTTP requests made with Undici and align with the best practices of providing detailed and actionable telemetry data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant