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

[stretch][spike] Node.js library HTTP2 support in core Node HTTP2 #2754

Closed
kmudduluru opened this issue Nov 19, 2024 · 4 comments
Closed

[stretch][spike] Node.js library HTTP2 support in core Node HTTP2 #2754

kmudduluru opened this issue Nov 19, 2024 · 4 comments
Assignees

Comments

@kmudduluru
Copy link
Contributor

kmudduluru commented Nov 19, 2024

This ticket is to do a spike on what it takes to support HTTP2 in core Node. could be a long running transaction similar to what we did in GRPC. Describe the possible approach with pros and cons and share the findings with the team.

Description

Overall intent is to ensure the Node Agent HTTP instrumentation works properly with the HTTP 2 protocol.

@kmudduluru kmudduluru converted this from a draft issue Nov 19, 2024
@workato-integration
Copy link

@newrelic-node-agent-team newrelic-node-agent-team moved this from To do: Features prioritized for this sprint to Triage Needed: Unprioritized Features in Node.js Engineering Board Nov 19, 2024
@kmudduluru
Copy link
Contributor Author

@kmudduluru kmudduluru moved this from Triage Needed: Unprioritized Features to Prioritized in Node.js Engineering Board Dec 9, 2024
@kmudduluru
Copy link
Contributor Author

Understand how java agent team supported this.

@kmudduluru kmudduluru changed the title [spike] Node.js library HTTP2 support [spike] Node.js library HTTP2/HTTP3 support Jan 24, 2025
@kmudduluru kmudduluru changed the title [spike] Node.js library HTTP2/HTTP3 support [spike] Node.js library HTTP2 support Jan 24, 2025
@kmudduluru kmudduluru changed the title [spike] Node.js library HTTP2 support [spike] Node.js library HTTP2 support in core Node HTTP2 Jan 24, 2025
@kmudduluru kmudduluru changed the title [spike] Node.js library HTTP2 support in core Node HTTP2 [stretch][spike] Node.js library HTTP2 support in core Node HTTP2 Feb 4, 2025
@jsumners-nr jsumners-nr self-assigned this Feb 7, 2025
@kmudduluru kmudduluru moved this from In Quarter to To do: In current sprint in Node.js Engineering Board Feb 20, 2025
@jsumners-nr
Copy link
Contributor

Unlike Java, where there are multiple discrete HTTP implementations, there is only one HTTP implementation in Node.js: the one provided by core. As a result, all web frameworks targeting Node.js are basically wrappers on top of core's HTTP implementation. This is equally true for the HTTP/2 implementation.

Known state of HTTP/2 in the ecosystem:

  1. OTEL does not support it add auto instrumentation of http2 module open-telemetry/opentelemetry-js#2667
  2. Sentry does not support it https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/http/
  3. DataDog supports client and server, but they utilize a DiagnosticsChannel approach that makes things easier https://github.com/DataDog/dd-trace-js/tree/9329f6a2b06dda4586f415aa34cf9b0256fa2525/packages/datadog-plugin-http2/src
  4. Elastic APM supports it by wrapping the stream's end method https://github.com/elastic/apm-agent-nodejs/blob/6d1665f0f5d968b8a79234c315a3aa71abca3a7d/lib/instrumentation/modules/http2.js

Our tracing model is built around the concept of a transaction:

  1. a request is received
  2. a "transaction" is started
  3. work is performed and data collected
  4. a response is sent
  5. the transaction is ended

In step 3, all tracing data being collected is done so within the application's memory. Thus, if we were to take the same approach as Elastic, we would very likely end up generating a lot of in-memory data and receive reports that we are blowing up customer applications. If we had an event based model, like the DataDog implementation, we shouldn't see this issue.

It is my recommendation that we do not try to generically instrument Node.js's HTTP/2 module. If anything, I suggest we write documentation that shows people how to instrument specific HTTP/2 scenarios with our agent API.

@github-project-automation github-project-automation bot moved this from To do: In current sprint to Done: Issues recently completed in Node.js Engineering Board Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done: Issues recently completed
Development

No branches or pull requests

2 participants