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

Integrate request/response headers and body into OpenTelemetry traces #28181

Open
andreasteich opened this issue Feb 19, 2025 · 0 comments
Open

Comments

@andreasteich
Copy link

Currently, OpenTelemetry tracing in Deno captures metadata about HTTP requests but does not include request/response headers or bodies. To improve observability and debugging, it would be useful to optionally integrate this information into traces.

Expected Behavior

  • HTTP request headers should be included in traces.
  • HTTP response headers should be included in traces.
  • Optionally, request and response bodies should be captured (with appropriate safeguards to prevent logging sensitive data).
  • Configurable filtering should be available to exclude specific headers or payloads.

Actual Behavior

  • OpenTelemetry traces currently do not include request/response headers or bodies.

Use Cases

  • Debugging distributed applications by providing full request/response context in traces.
  • Analyzing API behavior and performance bottlenecks.
  • Enhancing monitoring by correlating headers (e.g., correlation IDs) across services.

Proposed Solution

  • Modify the OpenTelemetry instrumentation in Deno to capture request/response headers.
  • Introduce an opt-in mechanism for capturing request/response bodies.
  • Implement filtering mechanisms to prevent sensitive data exposure.
  • Ensure performance impact is minimal by making body capture optional.

Would love to hear thoughts on feasibility and potential concerns regarding security and performance!

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

No branches or pull requests

1 participant