Skip to content

Question: plans for Apollo Client auto-instrumentation? #3609

Description

@sfc-gh-zeningchen
  • This only affects the JavaScript OpenTelemetry library
  • This may affect other libraries, but I would like to get opinions here first

I’m opening this discussion to ask about the current and planned support model for Apollo Client auto-instrumentation in OpenTelemetry JS.

From what I can tell, there does not appear to be a dedicated Apollo Client instrumentation package, such as @opentelemetry/instrumentation-apollo-client. Existing browser instrumentation can capture the underlying fetch or XHR requests, but it does not appear to provide Apollo Client or GraphQL-client-level telemetry, such as operation names, operation types, GraphQL errors, cache behavior, or Apollo Link lifecycle spans.

I wanted to ask:

  1. Is the absence of Apollo Client-specific auto-instrumentation intentional?
  2. Is Apollo Client considered in scope for OpenTelemetry JS instrumentation?
  3. Are there any current plans to add dedicated Apollo Client instrumentation?
  4. If there are no current plans, are maintainers open to a proposal or contribution for this?
  5. Is the recommended approach today to rely only on generic fetch/XHR instrumentation and add custom instrumentation manually for GraphQL metadata?
  6. Are there technical, semantic convention, privacy, or maintenance concerns that have made Apollo Client instrumentation difficult to support?

The motivation is that Apollo Client is widely used in frontend JavaScript applications, and generic HTTP spans often do not provide enough GraphQL-specific context to understand client-side GraphQL behavior. It would be helpful to understand whether this is intentionally out of scope, already planned, or something the community could help contribute.

Tip: [React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. [Learn more here](https://opentelemetry.io/community/end-user/issue-participation/).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions