Skip to content

Commit

Permalink
Remove includeTraceContext configuration option
Browse files Browse the repository at this point in the history
- the option is no longer used:
  open-telemetry/opentelemetry-js#3817
  • Loading branch information
Vunovati committed Sep 12, 2023
1 parent 7652365 commit 194daca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions otlp-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion test/otlp-logger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 194daca

Please sign in to comment.