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
1 change: 1 addition & 0 deletions experimental/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ 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
* fix: include tracestate in export [#3569](https://github.com/open-telemetry/opentelemetry-js/pull/3569) @flarna

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

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

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

metrics.setGlobalMeterProvider(meterProvider);
}

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

public shutdown(): Promise<void> {