Skip to content

Commit

Permalink
fix(instrumentation-runtime-node): mixin default config in constructor (
Browse files Browse the repository at this point in the history
#2036)

Co-authored-by: Marc Pichler <[email protected]>
  • Loading branch information
satazor and pichlermarc authored Mar 25, 2024
1 parent 84ef980 commit 146edfa
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ export class RuntimeNodeInstrumentation extends InstrumentationBase {
private _ELUs: EventLoopUtilization[] = [];
private _interval: NodeJS.Timeout | undefined;

constructor(config: RuntimeNodeInstrumentationConfig = DEFAULT_CONFIG) {
super('@opentelemetry/instrumentation-runtime-node', VERSION, config);
constructor(config: RuntimeNodeInstrumentationConfig = {}) {
super(
'@opentelemetry/instrumentation-runtime-node',
VERSION,
Object.assign({}, DEFAULT_CONFIG, config)
);
}

private _addELU() {
Expand Down

0 comments on commit 146edfa

Please sign in to comment.