From bc0ef56d84dd68ccf5d75737b0d92e162f2dbb15 Mon Sep 17 00:00:00 2001 From: Said Sef <6002187+saidsef@users.noreply.github.com> Date: Sat, 13 Apr 2024 00:14:37 +0100 Subject: [PATCH] chore: setup tracing node as default function (#121) * chore: setup tracing node as default function * chore: update package lock --- libs/index.mjs | 2 +- package-lock.json | 16 ++++++++-------- package.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libs/index.mjs b/libs/index.mjs index 51b2ce7..0c031f0 100644 --- a/libs/index.mjs +++ b/libs/index.mjs @@ -55,7 +55,7 @@ diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.INFO); * be used to create and export spans for tracing various operations within * the service. */ -export const setupTracing = (serviceName, appName="application", endpoint=null) => { +export default function setupTracing (serviceName, appName="application", endpoint=null) { const provider = new NodeTracerProvider({ resource: new Resource({ [SemanticResourceAttributes.SERVICE_NAME]: serviceName, diff --git a/package-lock.json b/package-lock.json index 48942b8..c1ff688 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@saidsef/tracing-node", - "version": "1.9.6", + "version": "1.9.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@saidsef/tracing-node", - "version": "1.9.6", + "version": "1.9.7", "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.8.0", @@ -2159,9 +2159,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001608", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001608.tgz", - "integrity": "sha512-cjUJTQkk9fQlJR2s4HMuPMvTiRggl0rAVMtthQuyOlDWuqHXqN8azLq+pi8B2TjwKJ32diHjUqRIKeFX4z1FoA==", + "version": "1.0.30001609", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001609.tgz", + "integrity": "sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA==", "dev": true, "funding": [ { @@ -2379,9 +2379,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.733", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.733.tgz", - "integrity": "sha512-gUI9nhI2iBGF0OaYYLKOaOtliFMl+Bt1rY7VmEjwxOxqoYLub/D9xmduPEhbw2imE6gYkJKhIE5it+KE2ulVxQ==", + "version": "1.4.736", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.736.tgz", + "integrity": "sha512-Rer6wc3ynLelKNM4lOCg7/zPQj8tPOCB2hzD32PX9wd3hgRRi9MxEbmkFCokzcEhRVMiOVLjnL9ig9cefJ+6+Q==", "dev": true }, "node_modules/emittery": { diff --git a/package.json b/package.json index 0ab9d92..87f920a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@saidsef/tracing-node", - "version": "1.9.6", + "version": "1.9.7", "description": "tracing NodeJS - This is a wrapper for OpenTelemetry instrumentation packages", "main": "libs/index.mjs", "scripts": {