diff --git a/package-lock.json b/package-lock.json index 4813bde..6c50c94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/otel", - "version": "5.15.0", + "version": "5.16.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@athenna/otel", - "version": "5.15.0", + "version": "5.16.0", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.0", diff --git a/package.json b/package.json index 1e14626..5d50740 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/otel", - "version": "5.15.0", + "version": "5.16.0", "description": "OpenTelemetry package for Athenna.", "license": "MIT", "author": "João Lenon ", diff --git a/src/exceptions/ContextNotInitializedException.ts b/src/exceptions/ContextNotInitializedException.ts index c84002e..402563e 100644 --- a/src/exceptions/ContextNotInitializedException.ts +++ b/src/exceptions/ContextNotInitializedException.ts @@ -7,7 +7,7 @@ export class ContextNotInitializedException extends Exception { super({ code: 'E_CONTEXT_NOT_INITIALIZED', message, - help: 'Use ({yellow, bold} Otel.withContext(() => { ... })) to initialize the context store.' + help: 'Use Otel.withContext(() => { ... }) to initialize the context store.' }) } } diff --git a/src/otel/OtelImpl.ts b/src/otel/OtelImpl.ts index af36306..8a42454 100644 --- a/src/otel/OtelImpl.ts +++ b/src/otel/OtelImpl.ts @@ -16,7 +16,6 @@ import { type Context } from '@opentelemetry/api' -import { Log } from '@athenna/logger' import { Config } from '@athenna/config' import { NodeSDK } from '@opentelemetry/sdk-node' import { Is, Options, Macroable } from '@athenna/common' @@ -440,7 +439,9 @@ export class OtelImpl extends Macroable { ) if (!store || !(store instanceof Map)) { - Log.channelOrVanilla('exception').error(new ContextNotInitializedException()) + console.error( + JSON.stringify(new ContextNotInitializedException(), null, 2) + ) return new Map() }