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

Configurability of OpenTelemetry instrumentation #2299

Open
trentm opened this issue Jun 28, 2024 · 1 comment
Open

Configurability of OpenTelemetry instrumentation #2299

trentm opened this issue Jun 28, 2024 · 1 comment

Comments

@trentm
Copy link
Member

trentm commented Jun 28, 2024

🚀 Feature Proposal

Native OpenTelemetry instrumentation is being added as part of #2267
From review of part of that work:

It would be good to provide some configurability of the OTel instrumentation.
Similar to how the older diagnostics events can be configured via TransportOptions.diagnostic, there are a couple things that might be nice to be configurable:

  1. A way to disable the OTel instrumentation. Users of an OTel SDK will be somewhat used to the ability to disable particular instrumentations. Usually this config var is called enabled, in the context of an instrumentation.
  2. A way to suppress child HTTP spans that will be created under the Elasticsearch spans. There are a few existing OTel instrumentations that have this same situation, e.g.: instrumentation-aws-sdk, instrumentation-mongoose. Typically this config var is a boolean called suppressInternalInstrumentation.

AFAIK there aren't any other Node.js libraries that have native OTel instrumentation yet, so there isn't prior art on exactly what to name OTel-related config. Perhaps having this in @elastic/transport:

export interface TransportOptions {
  opentelemetry?: {
    enabled?: boolean;
    suppressInternalInstrumentation?: boolean
  }
  // ...

and the equivalent in interface ClientOptions in @elastic/elasticsearch.

I'm suggesting they get grouped under a "opentelemetry." namespace, because there could be requests for more configuration options as well. For example, see the instrumentation-aws-sdk and instrumentation-mongoose links above.

Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove the stale label, or leave a comment, or this will be closed in 14 days.

@github-actions github-actions bot added the stale label Sep 30, 2024
@JoshMock JoshMock removed the stale label Sep 30, 2024
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

2 participants