Skip to content

Commit 146edfa

Browse files
satazorpichlermarc
andauthored
fix(instrumentation-runtime-node): mixin default config in constructor (#2036)
Co-authored-by: Marc Pichler <marc.pichler@dynatrace.com>
1 parent 84ef980 commit 146edfa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plugins/node/instrumentation-runtime-node/src/instrumentation.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ export class RuntimeNodeInstrumentation extends InstrumentationBase {
3030
private _ELUs: EventLoopUtilization[] = [];
3131
private _interval: NodeJS.Timeout | undefined;
3232

33-
constructor(config: RuntimeNodeInstrumentationConfig = DEFAULT_CONFIG) {
34-
super('@opentelemetry/instrumentation-runtime-node', VERSION, config);
33+
constructor(config: RuntimeNodeInstrumentationConfig = {}) {
34+
super(
35+
'@opentelemetry/instrumentation-runtime-node',
36+
VERSION,
37+
Object.assign({}, DEFAULT_CONFIG, config)
38+
);
3539
}
3640

3741
private _addELU() {

0 commit comments

Comments
 (0)