Skip to content
6 changes: 2 additions & 4 deletions packages/opentelemetry/src/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import { registerInstrumentations } from '@opentelemetry/instrumentation';
* This method takes an OpenTelemetry instrumentation or
* array of instrumentations and registers them with OpenTelemetry.
*/
export function addOpenTelemetryInstrumentation(
instrumentation: InstrumentationOption | InstrumentationOption[],
): void {
export function addOpenTelemetryInstrumentation(...instrumentations: InstrumentationOption[]): void {
registerInstrumentations({
instrumentations: Array.isArray(instrumentation) ? instrumentation : [instrumentation],
instrumentations,
});
}