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

Deduplicate instrumentations given to startTracing #338

Open
seemk opened this issue Oct 5, 2021 · 0 comments
Open

Deduplicate instrumentations given to startTracing #338

seemk opened this issue Oct 5, 2021 · 0 comments

Comments

@seemk
Copy link
Contributor

seemk commented Oct 5, 2021

When using the advanced options with a custom instrumentation list, instrumentations (HttpInstrumentation here) might be passed to OTel SDK twice:

startTracing({
  instrumentations: [...getInstrumentations(), new HttpInstrumentation()]
})

While both HttpInstrumentations are configured, only 1 hook exists (from the instrumentation which appears later in the array). However I'm not sure if it is defined behaviour by OpenTelemetry JS. We could deduplicate the instrumentations by name and only pass 1 instrumentation of each to the SDK.

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