update documentation to register metrics once
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -14,6 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Prevent from running more than once (due to worker threads)
|
||||
if (!require('node:worker_threads').isMainThread) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { NodeSDK } = require('@opentelemetry/sdk-node');
|
||||
const {
|
||||
getNodeAutoInstrumentations,
|
||||
|
||||
Reference in New Issue
Block a user