@opentelemetry/instrumentation-winston 0.58.0 → 0.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,7 @@
1
1
  "use strict";
2
2
  /*
3
3
  * Copyright The OpenTelemetry Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * https://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
4
+ * SPDX-License-Identifier: Apache-2.0
16
5
  */
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
18
7
  exports.WinstonInstrumentation = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAA2D;AAAlD,yHAAA,sBAAsB,OAAA","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { WinstonInstrumentation } from './instrumentation';\nexport type { LogHookFunction, WinstonInstrumentationConfig } from './types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qDAA2D;AAAlD,yHAAA,sBAAsB,OAAA","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport { WinstonInstrumentation } from './instrumentation';\nexport type { LogHookFunction, WinstonInstrumentationConfig } from './types';\n"]}
@@ -1,18 +1,7 @@
1
1
  "use strict";
2
2
  /*
3
3
  * Copyright The OpenTelemetry Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * https://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
4
+ * SPDX-License-Identifier: Apache-2.0
16
5
  */
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
18
7
  exports.WinstonInstrumentation = void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA8E;AAC9E,sDAAyD;AACzD,oEAMwC;AASxC,kBAAkB;AAClB,uCAA0D;AAE1D,MAAM,gBAAgB,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,CAAC,CAAC;AAEvC,MAAa,sBAAuB,SAAQ,qCAAiD;IAC3F,YAAY,SAAuC,EAAE;QACnD,KAAK,CAAC,sBAAY,EAAE,yBAAe,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IAES,IAAI;QACZ,MAAM,4CAA4C,GAChD,IAAI,qDAAmC,CACrC,SAAS,EACT,gBAAgB,EAChB,aAAa,CAAC,EAAE,CAAC,aAAa,EAC9B,GAAG,EAAE,GAAE,CAAC,EACR;YACE,IAAI,+CAA6B,CAC/B,+BAA+B,EAC/B,gBAAgB,EAChB,CAAC,MAAsB,EAAE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CACL,GAAG;gBACH,GAAG,CAAC,KAAK,KAAK,SAAS;gBACvB,GAAG,CAAC,KAAK;gBACT,GAAG,CAAC,IAAI;gBACR,GAAG,CAAC,KAAK;gBACT,GAAG,CAAC,OAAO;gBACX,GAAG,CAAC,MAAM;gBACV,GAAG,CAAC,IAAI;gBACR,GAAG,CAAC,KAAK,CACV,CAAC;QACJ,CAAC;QAED,OAAO;IACT,CAAC;CACF;AAhUD,wDAgUC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { context, trace, isSpanContextValid, Span } from '@opentelemetry/api';\nimport { SeverityNumber } from '@opentelemetry/api-logs';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport type { WinstonInstrumentationConfig } from './types';\nimport type {\n Winston2LoggerModule,\n Winston2LogMethod,\n Winston3ConfigureMethod,\n Winston3LogMethod,\n Winston3Logger,\n} from './internal-types';\n/** @knipignore */\nimport { PACKAGE_NAME, PACKAGE_VERSION } from './version';\n\nconst winston3Versions = ['>=3 <4'];\nconst winstonPre3Versions = ['>=1 <3'];\n\nexport class WinstonInstrumentation extends InstrumentationBase<WinstonInstrumentationConfig> {\n constructor(config: WinstonInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n }\n\n protected init() {\n const winstons3instrumentationNodeModuleDefinition =\n new InstrumentationNodeModuleDefinition(\n 'winston',\n winston3Versions,\n moduleExports => moduleExports,\n () => {},\n [\n new InstrumentationNodeModuleFile(\n 'winston/lib/winston/logger.js',\n winston3Versions,\n (logger: Winston3Logger) => {\n if (isWrapped(logger.prototype['write'])) {\n this._unwrap(logger.prototype, 'write');\n }\n this._wrap(logger.prototype, 'write', this._getPatchedWrite());\n\n // Wrap configure\n if (isWrapped(logger.prototype['configure'])) {\n this._unwrap(logger.prototype, 'configure');\n }\n this._wrap(\n logger.prototype,\n 'configure',\n this._getPatchedConfigure()\n );\n\n return logger;\n },\n (logger: Winston3Logger) => {\n if (logger === undefined) return;\n this._unwrap(logger.prototype, 'write');\n this._unwrap(logger.prototype, 'configure');\n }\n ),\n ]\n );\n\n const winstons2instrumentationNodeModuleDefinition =\n new InstrumentationNodeModuleDefinition(\n 'winston',\n winstonPre3Versions,\n moduleExports => moduleExports,\n () => {},\n [\n new InstrumentationNodeModuleFile(\n 'winston/lib/winston/logger.js',\n winstonPre3Versions,\n (fileExports: Winston2LoggerModule) => {\n const proto = fileExports.Logger.prototype;\n\n if (isWrapped(proto.log)) {\n this._unwrap(proto, 'log');\n }\n this._wrap(proto, 'log', this._getPatchedLog());\n\n return fileExports;\n },\n (fileExports: Winston2LoggerModule) => {\n if (fileExports === undefined) return;\n this._unwrap(fileExports.Logger.prototype, 'log');\n }\n ),\n ]\n );\n return [\n winstons3instrumentationNodeModuleDefinition,\n winstons2instrumentationNodeModuleDefinition,\n ];\n }\n\n private _callHook(span: Span, record: Record<string, string>) {\n const { logHook } = this.getConfig();\n\n if (!logHook) {\n return;\n }\n\n safeExecuteInTheMiddle(\n () => logHook(span, record),\n err => {\n if (err) {\n this._diag.error('error calling logHook', err);\n }\n },\n true\n );\n }\n\n private _getPatchedWrite() {\n return (original: Winston3LogMethod) => {\n const instrumentation = this;\n return function patchedWrite(\n this: never,\n ...args: Parameters<typeof original>\n ) {\n const record = args[0];\n instrumentation._handleLogCorrelation(record);\n return original.apply(this, args);\n };\n };\n }\n\n private _getPatchedLog() {\n return (original: Winston2LogMethod) => {\n const instrumentation = this;\n return function patchedLog(\n this: never,\n ...args: Parameters<typeof original>\n ) {\n const record: Record<string, any> = {};\n instrumentation._handleLogCorrelation(record);\n // Inject in metadata argument\n let isDataInjected = false;\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'object') {\n args[i] = Object.assign(args[i], record);\n isDataInjected = true;\n break;\n }\n }\n if (!isDataInjected) {\n const insertAt =\n typeof args[args.length - 1] === 'function'\n ? args.length - 1\n : args.length;\n\n args.splice(insertAt, 0, record);\n }\n\n return original.apply(this, args);\n };\n };\n }\n\n private _getPatchedConfigure() {\n return (original: Winston3ConfigureMethod) => {\n const instrumentation = this;\n return function patchedConfigure(\n this: never,\n ...args: Parameters<typeof original>\n ) {\n const config = instrumentation.getConfig();\n if (!config.disableLogSending) {\n if (args && args.length > 0) {\n // Try to load Winston transport\n try {\n const {\n OpenTelemetryTransportV3,\n } = require('@opentelemetry/winston-transport');\n const originalTransports = args[0].transports;\n let newTransports = Array.isArray(originalTransports)\n ? originalTransports\n : [];\n let transportOptions = {};\n if (config.logSeverity) {\n const winstonLevel = instrumentation._winstonLevelFromSeverity(\n config.logSeverity,\n args[0].levels\n );\n transportOptions = { level: winstonLevel };\n }\n const openTelemetryTransport = new OpenTelemetryTransportV3(\n transportOptions\n );\n if (originalTransports && !Array.isArray(originalTransports)) {\n newTransports = [originalTransports];\n }\n newTransports.push(openTelemetryTransport);\n args[0].transports = newTransports;\n } catch (err) {\n instrumentation._diag.warn(\n '@opentelemetry/winston-transport is not available, log records will not be automatically sent.'\n );\n }\n }\n }\n return original.apply(this, args);\n };\n };\n }\n\n private _handleLogCorrelation(record: Record<string, string>) {\n if (!this.getConfig().disableLogCorrelation) {\n const span = trace.getSpan(context.active());\n if (span) {\n const spanContext = span.spanContext();\n if (isSpanContextValid(spanContext)) {\n const fields = {\n trace_id: spanContext.traceId,\n span_id: spanContext.spanId,\n trace_flags: `0${spanContext.traceFlags.toString(16)}`,\n };\n const enhancedRecord = Object.assign(record, fields);\n this._callHook(span, enhancedRecord);\n return enhancedRecord;\n }\n }\n }\n return record;\n }\n\n private _winstonLevelFromSeverity(\n severity: SeverityNumber,\n winstonLevels: { [key: string]: number } | undefined\n ): string | undefined {\n if (winstonLevels) {\n if (isNpmLevels(winstonLevels)) {\n if (severity >= SeverityNumber.ERROR) {\n return 'error';\n } else if (severity >= SeverityNumber.WARN) {\n return 'warn';\n } else if (severity >= SeverityNumber.INFO) {\n return 'info';\n } else if (severity >= SeverityNumber.DEBUG3) {\n return 'http';\n } else if (severity >= SeverityNumber.DEBUG2) {\n return 'verbose';\n } else if (severity >= SeverityNumber.DEBUG) {\n return 'debug';\n } else if (severity >= SeverityNumber.TRACE) {\n return 'silly';\n }\n } else if (isCliLevels(winstonLevels)) {\n if (severity >= SeverityNumber.ERROR) {\n return 'error';\n } else if (severity >= SeverityNumber.WARN) {\n return 'warn';\n } else if (severity >= SeverityNumber.INFO3) {\n return 'help';\n } else if (severity >= SeverityNumber.INFO2) {\n return 'data';\n } else if (severity >= SeverityNumber.INFO) {\n return 'info';\n } else if (severity >= SeverityNumber.DEBUG) {\n return 'debug';\n } else if (severity >= SeverityNumber.TRACE4) {\n return 'prompt';\n } else if (severity >= SeverityNumber.TRACE3) {\n return 'verbose';\n } else if (severity >= SeverityNumber.TRACE2) {\n return 'input';\n } else if (severity >= SeverityNumber.TRACE) {\n return 'silly';\n }\n } else if (isSyslogLevels(winstonLevels)) {\n if (severity >= SeverityNumber.FATAL2) {\n return 'emerg';\n } else if (severity >= SeverityNumber.FATAL) {\n return 'alert';\n } else if (severity >= SeverityNumber.ERROR2) {\n return 'crit';\n } else if (severity >= SeverityNumber.ERROR) {\n return 'error';\n } else if (severity >= SeverityNumber.WARN) {\n return 'warning';\n } else if (severity >= SeverityNumber.INFO2) {\n return 'notice';\n } else if (severity >= SeverityNumber.INFO) {\n return 'info';\n } else if (severity >= SeverityNumber.TRACE) {\n return 'debug';\n }\n }\n // Unknown level\n this._diag.warn(\n 'failed to configure severity with existing winston levels'\n );\n }\n\n function isCliLevels(arg: any): boolean {\n return (\n arg &&\n arg.error !== undefined &&\n arg.warn &&\n arg.help &&\n arg.data &&\n arg.info &&\n arg.debug &&\n arg.prompt &&\n arg.verbose &&\n arg.input &&\n arg.silly\n );\n }\n\n function isNpmLevels(arg: any): boolean {\n return (\n arg &&\n arg.error !== undefined &&\n arg.warn &&\n arg.info &&\n arg.http &&\n arg.verbose &&\n arg.debug &&\n arg.silly\n );\n }\n\n function isSyslogLevels(arg: any): boolean {\n return (\n arg &&\n arg.emerg !== undefined &&\n arg.alert &&\n arg.crit &&\n arg.error &&\n arg.warning &&\n arg.notice &&\n arg.info &&\n arg.debug\n );\n }\n\n return;\n }\n}\n"]}
1
+ {"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,4CAA8E;AAC9E,sDAAyD;AACzD,oEAMwC;AASxC,kBAAkB;AAClB,uCAA0D;AAE1D,MAAM,gBAAgB,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,CAAC,CAAC;AAEvC,MAAa,sBAAuB,SAAQ,qCAAiD;IAC3F,YAAY,SAAuC,EAAE;QACnD,KAAK,CAAC,sBAAY,EAAE,yBAAe,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IAES,IAAI;QACZ,MAAM,4CAA4C,GAChD,IAAI,qDAAmC,CACrC,SAAS,EACT,gBAAgB,EAChB,aAAa,CAAC,EAAE,CAAC,aAAa,EAC9B,GAAG,EAAE,GAAE,CAAC,EACR;YACE,IAAI,+CAA6B,CAC/B,+BAA+B,EAC/B,gBAAgB,EAChB,CAAC,MAAsB,EAAE,EAAE;gBACzB,IAAI,IAAA,2BAAS,EAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE;oBACxC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;iB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AAM;gBACV,GAAG,CAAC,IAAI;gBACR,GAAG,CAAC,KAAK,CACV,CAAC;QACJ,CAAC;QAED,OAAO;IACT,CAAC;CACF;AAhUD,wDAgUC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { context, trace, isSpanContextValid, Span } from '@opentelemetry/api';\nimport { SeverityNumber } from '@opentelemetry/api-logs';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport type { WinstonInstrumentationConfig } from './types';\nimport type {\n Winston2LoggerModule,\n Winston2LogMethod,\n Winston3ConfigureMethod,\n Winston3LogMethod,\n Winston3Logger,\n} from './internal-types';\n/** @knipignore */\nimport { PACKAGE_NAME, PACKAGE_VERSION } from './version';\n\nconst winston3Versions = ['>=3 <4'];\nconst winstonPre3Versions = ['>=1 <3'];\n\nexport class WinstonInstrumentation extends InstrumentationBase<WinstonInstrumentationConfig> {\n constructor(config: WinstonInstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n }\n\n protected init() {\n const winstons3instrumentationNodeModuleDefinition =\n new InstrumentationNodeModuleDefinition(\n 'winston',\n winston3Versions,\n moduleExports => moduleExports,\n () => {},\n [\n new InstrumentationNodeModuleFile(\n 'winston/lib/winston/logger.js',\n winston3Versions,\n (logger: Winston3Logger) => {\n if (isWrapped(logger.prototype['write'])) {\n this._unwrap(logger.prototype, 'write');\n }\n this._wrap(logger.prototype, 'write', this._getPatchedWrite());\n\n // Wrap configure\n if (isWrapped(logger.prototype['configure'])) {\n this._unwrap(logger.prototype, 'configure');\n }\n this._wrap(\n logger.prototype,\n 'configure',\n this._getPatchedConfigure()\n );\n\n return logger;\n },\n (logger: Winston3Logger) => {\n if (logger === undefined) return;\n this._unwrap(logger.prototype, 'write');\n this._unwrap(logger.prototype, 'configure');\n }\n ),\n ]\n );\n\n const winstons2instrumentationNodeModuleDefinition =\n new InstrumentationNodeModuleDefinition(\n 'winston',\n winstonPre3Versions,\n moduleExports => moduleExports,\n () => {},\n [\n new InstrumentationNodeModuleFile(\n 'winston/lib/winston/logger.js',\n winstonPre3Versions,\n (fileExports: Winston2LoggerModule) => {\n const proto = fileExports.Logger.prototype;\n\n if (isWrapped(proto.log)) {\n this._unwrap(proto, 'log');\n }\n this._wrap(proto, 'log', this._getPatchedLog());\n\n return fileExports;\n },\n (fileExports: Winston2LoggerModule) => {\n if (fileExports === undefined) return;\n this._unwrap(fileExports.Logger.prototype, 'log');\n }\n ),\n ]\n );\n return [\n winstons3instrumentationNodeModuleDefinition,\n winstons2instrumentationNodeModuleDefinition,\n ];\n }\n\n private _callHook(span: Span, record: Record<string, string>) {\n const { logHook } = this.getConfig();\n\n if (!logHook) {\n return;\n }\n\n safeExecuteInTheMiddle(\n () => logHook(span, record),\n err => {\n if (err) {\n this._diag.error('error calling logHook', err);\n }\n },\n true\n );\n }\n\n private _getPatchedWrite() {\n return (original: Winston3LogMethod) => {\n const instrumentation = this;\n return function patchedWrite(\n this: never,\n ...args: Parameters<typeof original>\n ) {\n const record = args[0];\n instrumentation._handleLogCorrelation(record);\n return original.apply(this, args);\n };\n };\n }\n\n private _getPatchedLog() {\n return (original: Winston2LogMethod) => {\n const instrumentation = this;\n return function patchedLog(\n this: never,\n ...args: Parameters<typeof original>\n ) {\n const record: Record<string, any> = {};\n instrumentation._handleLogCorrelation(record);\n // Inject in metadata argument\n let isDataInjected = false;\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'object') {\n args[i] = Object.assign(args[i], record);\n isDataInjected = true;\n break;\n }\n }\n if (!isDataInjected) {\n const insertAt =\n typeof args[args.length - 1] === 'function'\n ? args.length - 1\n : args.length;\n\n args.splice(insertAt, 0, record);\n }\n\n return original.apply(this, args);\n };\n };\n }\n\n private _getPatchedConfigure() {\n return (original: Winston3ConfigureMethod) => {\n const instrumentation = this;\n return function patchedConfigure(\n this: never,\n ...args: Parameters<typeof original>\n ) {\n const config = instrumentation.getConfig();\n if (!config.disableLogSending) {\n if (args && args.length > 0) {\n // Try to load Winston transport\n try {\n const {\n OpenTelemetryTransportV3,\n } = require('@opentelemetry/winston-transport');\n const originalTransports = args[0].transports;\n let newTransports = Array.isArray(originalTransports)\n ? originalTransports\n : [];\n let transportOptions = {};\n if (config.logSeverity) {\n const winstonLevel = instrumentation._winstonLevelFromSeverity(\n config.logSeverity,\n args[0].levels\n );\n transportOptions = { level: winstonLevel };\n }\n const openTelemetryTransport = new OpenTelemetryTransportV3(\n transportOptions\n );\n if (originalTransports && !Array.isArray(originalTransports)) {\n newTransports = [originalTransports];\n }\n newTransports.push(openTelemetryTransport);\n args[0].transports = newTransports;\n } catch (err) {\n instrumentation._diag.warn(\n '@opentelemetry/winston-transport is not available, log records will not be automatically sent.'\n );\n }\n }\n }\n return original.apply(this, args);\n };\n };\n }\n\n private _handleLogCorrelation(record: Record<string, string>) {\n if (!this.getConfig().disableLogCorrelation) {\n const span = trace.getSpan(context.active());\n if (span) {\n const spanContext = span.spanContext();\n if (isSpanContextValid(spanContext)) {\n const fields = {\n trace_id: spanContext.traceId,\n span_id: spanContext.spanId,\n trace_flags: `0${spanContext.traceFlags.toString(16)}`,\n };\n const enhancedRecord = Object.assign(record, fields);\n this._callHook(span, enhancedRecord);\n return enhancedRecord;\n }\n }\n }\n return record;\n }\n\n private _winstonLevelFromSeverity(\n severity: SeverityNumber,\n winstonLevels: { [key: string]: number } | undefined\n ): string | undefined {\n if (winstonLevels) {\n if (isNpmLevels(winstonLevels)) {\n if (severity >= SeverityNumber.ERROR) {\n return 'error';\n } else if (severity >= SeverityNumber.WARN) {\n return 'warn';\n } else if (severity >= SeverityNumber.INFO) {\n return 'info';\n } else if (severity >= SeverityNumber.DEBUG3) {\n return 'http';\n } else if (severity >= SeverityNumber.DEBUG2) {\n return 'verbose';\n } else if (severity >= SeverityNumber.DEBUG) {\n return 'debug';\n } else if (severity >= SeverityNumber.TRACE) {\n return 'silly';\n }\n } else if (isCliLevels(winstonLevels)) {\n if (severity >= SeverityNumber.ERROR) {\n return 'error';\n } else if (severity >= SeverityNumber.WARN) {\n return 'warn';\n } else if (severity >= SeverityNumber.INFO3) {\n return 'help';\n } else if (severity >= SeverityNumber.INFO2) {\n return 'data';\n } else if (severity >= SeverityNumber.INFO) {\n return 'info';\n } else if (severity >= SeverityNumber.DEBUG) {\n return 'debug';\n } else if (severity >= SeverityNumber.TRACE4) {\n return 'prompt';\n } else if (severity >= SeverityNumber.TRACE3) {\n return 'verbose';\n } else if (severity >= SeverityNumber.TRACE2) {\n return 'input';\n } else if (severity >= SeverityNumber.TRACE) {\n return 'silly';\n }\n } else if (isSyslogLevels(winstonLevels)) {\n if (severity >= SeverityNumber.FATAL2) {\n return 'emerg';\n } else if (severity >= SeverityNumber.FATAL) {\n return 'alert';\n } else if (severity >= SeverityNumber.ERROR2) {\n return 'crit';\n } else if (severity >= SeverityNumber.ERROR) {\n return 'error';\n } else if (severity >= SeverityNumber.WARN) {\n return 'warning';\n } else if (severity >= SeverityNumber.INFO2) {\n return 'notice';\n } else if (severity >= SeverityNumber.INFO) {\n return 'info';\n } else if (severity >= SeverityNumber.TRACE) {\n return 'debug';\n }\n }\n // Unknown level\n this._diag.warn(\n 'failed to configure severity with existing winston levels'\n );\n }\n\n function isCliLevels(arg: any): boolean {\n return (\n arg &&\n arg.error !== undefined &&\n arg.warn &&\n arg.help &&\n arg.data &&\n arg.info &&\n arg.debug &&\n arg.prompt &&\n arg.verbose &&\n arg.input &&\n arg.silly\n );\n }\n\n function isNpmLevels(arg: any): boolean {\n return (\n arg &&\n arg.error !== undefined &&\n arg.warn &&\n arg.info &&\n arg.http &&\n arg.verbose &&\n arg.debug &&\n arg.silly\n );\n }\n\n function isSyslogLevels(arg: any): boolean {\n return (\n arg &&\n arg.emerg !== undefined &&\n arg.alert &&\n arg.crit &&\n arg.error &&\n arg.warning &&\n arg.notice &&\n arg.info &&\n arg.debug\n );\n }\n\n return;\n }\n}\n"]}
@@ -1,18 +1,7 @@
1
1
  "use strict";
2
2
  /*
3
3
  * Copyright The OpenTelemetry Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * https://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
4
+ * SPDX-License-Identifier: Apache-2.0
16
5
  */
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
18
7
  //# sourceMappingURL=internal-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal-types.js","sourceRoot":"","sources":["../../src/internal-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Logger as Winston3Logger } from 'winston';\nimport type {\n LoggerInstance as Winston2Logger,\n LogMethod as Winston2LogMethod,\n} from 'winston2';\nexport type Winston3LogMethod = Winston3Logger['write'];\nexport type Winston3ConfigureMethod = Winston3Logger['configure'];\nexport type { Winston3Logger };\nexport type { Winston2LogMethod };\nexport type Winston2LoggerModule = {\n Logger: Winston2Logger & {\n prototype: { log: Winston2LogMethod };\n };\n};\nexport type { Winston2Logger };\n"]}
1
+ {"version":3,"file":"internal-types.js","sourceRoot":"","sources":["../../src/internal-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Logger as Winston3Logger } from 'winston';\nimport type {\n LoggerInstance as Winston2Logger,\n LogMethod as Winston2LogMethod,\n} from 'winston2';\nexport type Winston3LogMethod = Winston3Logger['write'];\nexport type Winston3ConfigureMethod = Winston3Logger['configure'];\nexport type { Winston3Logger };\nexport type { Winston2LogMethod };\nexport type Winston2LoggerModule = {\n Logger: Winston2Logger & {\n prototype: { log: Winston2LogMethod };\n };\n};\nexport type { Winston2Logger };\n"]}
@@ -1,18 +1,7 @@
1
1
  "use strict";
2
2
  /*
3
3
  * Copyright The OpenTelemetry Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * https://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
4
+ * SPDX-License-Identifier: Apache-2.0
16
5
  */
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
18
7
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Span } from '@opentelemetry/api';\nimport { SeverityNumber } from '@opentelemetry/api-logs';\nimport { InstrumentationConfig } from '@opentelemetry/instrumentation';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type LogHookFunction = (span: Span, record: Record<string, any>) => void;\n\nexport interface WinstonInstrumentationConfig extends InstrumentationConfig {\n /**\n * Whether to disable the automatic sending of log records to the\n * OpenTelemetry Logs SDK.\n * @default false\n */\n disableLogSending?: boolean;\n\n /**\n * Control Log sending severity level, logs will be sent for specified severity and higher.\n */\n logSeverity?: SeverityNumber;\n\n /**\n * Whether to disable the injection trace-context fields, and possibly other\n * fields from `logHook()`, into log records for log correlation.\n * @default false\n */\n disableLogCorrelation?: boolean;\n\n /**\n * A function that allows injecting additional fields in log records. It is\n * called, as `logHook(span, record)`, for each log record emitted in a valid\n * span context. It requires `disableLogCorrelation` to be false.\n */\n logHook?: LogHookFunction;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Span } from '@opentelemetry/api';\nimport { SeverityNumber } from '@opentelemetry/api-logs';\nimport { InstrumentationConfig } from '@opentelemetry/instrumentation';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type LogHookFunction = (span: Span, record: Record<string, any>) => void;\n\nexport interface WinstonInstrumentationConfig extends InstrumentationConfig {\n /**\n * Whether to disable the automatic sending of log records to the\n * OpenTelemetry Logs SDK.\n * @default false\n */\n disableLogSending?: boolean;\n\n /**\n * Control Log sending severity level, logs will be sent for specified severity and higher.\n */\n logSeverity?: SeverityNumber;\n\n /**\n * Whether to disable the injection trace-context fields, and possibly other\n * fields from `logHook()`, into log records for log correlation.\n * @default false\n */\n disableLogCorrelation?: boolean;\n\n /**\n * A function that allows injecting additional fields in log records. It is\n * called, as `logHook(span, record)`, for each log record emitted in a valid\n * span context. It requires `disableLogCorrelation` to be false.\n */\n logHook?: LogHookFunction;\n}\n"]}
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "0.58.0";
1
+ export declare const PACKAGE_VERSION = "0.59.0";
2
2
  export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-winston";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,22 +1,11 @@
1
1
  "use strict";
2
2
  /*
3
3
  * Copyright The OpenTelemetry Authors
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * https://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
4
+ * SPDX-License-Identifier: Apache-2.0
16
5
  */
17
6
  Object.defineProperty(exports, "__esModule", { value: true });
18
7
  exports.PACKAGE_NAME = exports.PACKAGE_VERSION = void 0;
19
8
  // this is autogenerated file, see scripts/version-update.js
20
- exports.PACKAGE_VERSION = '0.58.0';
9
+ exports.PACKAGE_VERSION = '0.59.0';
21
10
  exports.PACKAGE_NAME = '@opentelemetry/instrumentation-winston';
22
11
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,eAAe,GAAG,QAAQ,CAAC;AAC3B,QAAA,YAAY,GAAG,wCAAwC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const PACKAGE_VERSION = '0.58.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-winston';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,4DAA4D;AAC/C,QAAA,eAAe,GAAG,QAAQ,CAAC;AAC3B,QAAA,YAAY,GAAG,wCAAwC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const PACKAGE_VERSION = '0.59.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-winston';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentelemetry/instrumentation-winston",
3
- "version": "0.58.0",
3
+ "version": "0.59.0",
4
4
  "description": "OpenTelemetry instrumentation for `winston` logger",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -47,18 +47,18 @@
47
47
  "devDependencies": {
48
48
  "@opentelemetry/api": "^1.3.0",
49
49
  "@opentelemetry/context-async-hooks": "^2.0.0",
50
- "@opentelemetry/sdk-logs": "^0.214.0",
50
+ "@opentelemetry/sdk-logs": "^0.215.0",
51
51
  "@opentelemetry/sdk-trace-base": "^2.0.0",
52
52
  "@opentelemetry/sdk-trace-node": "^2.0.0",
53
- "@opentelemetry/winston-transport": "^0.24.0",
53
+ "@opentelemetry/winston-transport": "^0.25.0",
54
54
  "@types/triple-beam": "^1.3.2",
55
55
  "winston": "3.3.3",
56
56
  "winston2": "npm:winston@2.4.7"
57
57
  },
58
58
  "dependencies": {
59
- "@opentelemetry/api-logs": "^0.214.0",
60
- "@opentelemetry/instrumentation": "^0.214.0"
59
+ "@opentelemetry/api-logs": "^0.215.0",
60
+ "@opentelemetry/instrumentation": "^0.215.0"
61
61
  },
62
62
  "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-winston#readme",
63
- "gitHead": "ed97091c9890dd18e52759f2ea98e9d7593b3ae4"
63
+ "gitHead": "bd017c86bcdf369d7bc1b490e455f95b25385779"
64
64
  }