Skip to content

Deduplicate instrumentations given to startTracing #338

Open
@seemk

Description

@seemk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions