Fix sdk.start() as Not Async (#5617)
This commit is contained in:
parent
8efceed28c
commit
9f5ae79b1e
|
@ -24,6 +24,8 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
|
|||
|
||||
### :books: Documentation
|
||||
|
||||
* refactor(metrics): Updated metrics samples to no longer treat `sdk.start()` as async [#5617](https://github.com/open-telemetry/opentelemetry-js/pull/5617) @JacksonWeber
|
||||
|
||||
### :house: Internal
|
||||
|
||||
* test(sdk-metrics): fix multiple problematic assertRejects() calls [#5611](https://github.com/open-telemetry/opentelemetry-js/pull/5611) @cjihrig
|
||||
|
|
|
@ -71,7 +71,7 @@ const sdk = new opentelemetry.NodeSDK({
|
|||
|
||||
// You can optionally detect resources asynchronously from the environment.
|
||||
// Detected resources are merged with the resources provided in the SDK configuration.
|
||||
sdk.start().then(() => {
|
||||
sdk.start();
|
||||
// Resources have been detected and SDK is started
|
||||
console.log(`SDK started`)
|
||||
|
||||
|
@ -92,7 +92,6 @@ sdk.start().then(() => {
|
|||
|
||||
console.log(`Server is now listening on ${address}`)
|
||||
})
|
||||
});
|
||||
|
||||
// You can also use the shutdown method to gracefully shut down the SDK before process shutdown
|
||||
// or on some operating system signal.
|
||||
|
@ -159,7 +158,7 @@ const sdk = new opentelemetry.NodeSDK({
|
|||
|
||||
// You can optionally detect resources asynchronously from the environment.
|
||||
// Detected resources are merged with the resources provided in the SDK configuration.
|
||||
sdk.start().then(() => {
|
||||
sdk.start();
|
||||
// Resources have been detected and SDK is started
|
||||
console.log(`SDK started`)
|
||||
|
||||
|
@ -187,7 +186,6 @@ sdk.start().then(() => {
|
|||
|
||||
console.log(`Server is now listening on ${address}`)
|
||||
})
|
||||
});
|
||||
|
||||
// You can also use the shutdown method to gracefully shut down the SDK before process shutdown
|
||||
// or on some operating system signal.
|
||||
|
|
Loading…
Reference in New Issue