We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bee0677 commit 0a440ddCopy full SHA for 0a440dd
packages/opentelemetry/src/instrumentation.ts
@@ -5,10 +5,8 @@ import { registerInstrumentations } from '@opentelemetry/instrumentation';
5
* This method takes an OpenTelemetry instrumentation or
6
* array of instrumentations and registers them with OpenTelemetry.
7
*/
8
-export function addOpenTelemetryInstrumentation(
9
- instrumentation: InstrumentationOption | InstrumentationOption[],
10
-): void {
+export function addOpenTelemetryInstrumentation(...instrumentations: InstrumentationOption[]): void {
11
registerInstrumentations({
12
- instrumentations: Array.isArray(instrumentation) ? instrumentation : [instrumentation],
+ instrumentations,
13
});
14
}
0 commit comments