diff --git a/otlp-logger.js b/otlp-logger.js index 98b9990..2066936 100644 --- a/otlp-logger.js +++ b/otlp-logger.js @@ -24,7 +24,6 @@ const DEFAULT_MESSAGE_KEY = 'msg' * @property {string} loggerName * @property {string} serviceVersion * @property {Object} [resourceAttributes={}] - * @property {boolean} includeTraceContext * @property {import('@opentelemetry/sdk-logs').LogRecordExporter} [logRecordExporter] * @property {boolean} [useBatchProcessor=true] * @property {string} [messageKey="msg"] @@ -55,9 +54,7 @@ function getOtlpLogger (opts) { logs.setGlobalLoggerProvider(loggerProvider) - const logger = logs.getLogger(opts.loggerName, opts.serviceVersion, { - includeTraceContext: opts.includeTraceContext ?? true - }) + const logger = logs.getLogger(opts.loggerName, opts.serviceVersion) const mapperOptions = { messageKey: opts.messageKey || DEFAULT_MESSAGE_KEY diff --git a/test/otlp-logger.test.js b/test/otlp-logger.test.js index 0992d27..d476353 100644 --- a/test/otlp-logger.test.js +++ b/test/otlp-logger.test.js @@ -21,7 +21,6 @@ test('otlp logger logs a record in log exporter and maps all log levels correctl foo: 'bar' }, serviceVersion: '1.0.0', - includeTraceContext: true, messageKey: 'msg', logRecordExporter: exporter, useBatchProcessor: false