Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sdk-node): register instrumentations early #3502

Merged
merged 12 commits into from
Jan 27, 2023
2 changes: 2 additions & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ All notable changes to experimental packages in this project will be documented

### :bug: (Bug Fix)

* fix(sdk-node): register instrumentations early [#3502](https://github.com/open-telemetry/opentelemetry-js/pull/3502) @flarna

### :books: (Refine Doc)

### :house: (Internal)
Expand Down
8 changes: 4 additions & 4 deletions experimental/packages/opentelemetry-sdk-node/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ export class NodeSDK {
return;
}

registerInstrumentations({
instrumentations: this._instrumentations,
});

if (this._autoDetectResources) {
await this.detectResources();
}
Expand Down Expand Up @@ -255,10 +259,6 @@ export class NodeSDK {

metrics.setGlobalMeterProvider(meterProvider);
}

registerInstrumentations({
instrumentations: this._instrumentations,
});
}

public shutdown(): Promise<void> {
Expand Down