@opentelemetry/instrumentation-winston 0.48.0 → 0.49.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.
package/README.md CHANGED
@@ -137,7 +137,25 @@ const logger = winston.createLogger({
137
137
  ```
138
138
 
139
139
  > [!IMPORTANT]
140
- > Logs will be duplicated if `@opentelemetry/winston-transport` is added as a transport in `winston` and `@opentelemetry/instrumentation-winston` is configured with `disableLogSending: false`.
140
+ > Logs will be **duplicated** if `OpenTelemetryTransportV3` is explicitly added as a Winston logger transport **and** `@opentelemetry/instrumentation-winston` is active with the [Log sending](#log-sending) feature (the default). If you are both using `OpenTelemetryTransportV3` and instrumentation-winston, be sure to either disable instrumentation-winston completely, or disable its Log sending feature (`disableLogSending: false`). For example:
141
+ >
142
+ > ```js
143
+ > const { WinstonInstrumentation } = require('@opentelemetry/instrumentation-winston');
144
+ > const { registerInstrumentations } = require('@opentelemetry/instrumentation');
145
+ > registerInstrumentations({
146
+ > instrumentations: [
147
+ > new WinstonInstrumentation({
148
+ > disableLogSending: true
149
+ > }),
150
+ > ],
151
+ > });
152
+ > const { OpenTelemetryTransportV3 } = require('@opentelemetry/winston-transport');
153
+ > // Winston import must be after the WinstonInstrumentation creation
154
+ > const winston = require('winston');
155
+ >
156
+ > // ...
157
+ > const logger = winston.createLogger(...);
158
+ > ```
141
159
 
142
160
  ## Semantic Conventions
143
161
 
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "0.48.0";
1
+ export declare const PACKAGE_VERSION = "0.49.0";
2
2
  export declare const PACKAGE_NAME = "@opentelemetry/instrumentation-winston";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -17,6 +17,6 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.PACKAGE_NAME = exports.PACKAGE_VERSION = void 0;
19
19
  // this is autogenerated file, see scripts/version-update.js
20
- exports.PACKAGE_VERSION = '0.48.0';
20
+ exports.PACKAGE_VERSION = '0.49.0';
21
21
  exports.PACKAGE_NAME = '@opentelemetry/instrumentation-winston';
22
22
  //# 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.48.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-winston';\n"]}
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.49.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.48.0",
3
+ "version": "0.49.0",
4
4
  "description": "OpenTelemetry instrumentation for `winston` logger",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
@@ -10,20 +10,17 @@
10
10
  "directory": "packages/instrumentation-winston"
11
11
  },
12
12
  "scripts": {
13
- "test": "npm run test-v1-v2 && npm run test-v3 && nyc merge .nyc_output ./coverage/coverage-final.json",
14
- "test-v1-v2": "tav winston 2.4.7 npm run test-run",
15
- "test-v3": "npm run test-run",
16
- "test-run": "nyc --no-clean mocha 'test/**/*.test.ts'",
17
- "test-all-versions": "tav",
18
- "tdd": "npm run test-run -- --watch-extensions ts --watch",
19
13
  "clean": "rimraf build/*",
20
- "lint": "eslint . --ext .ts",
21
- "lint:fix": "eslint . --ext .ts --fix",
14
+ "compile": "tsc -p .",
15
+ "compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-winston",
16
+ "lint": "eslint . --ext=ts,js,mjs",
17
+ "lint:fix": "eslint . --ext=ts,js,mjs --fix",
22
18
  "lint:readme": "node ../../scripts/lint-readme.js",
23
19
  "prepublishOnly": "npm run compile",
24
- "version:update": "node ../../scripts/version-update.js",
25
- "setup:dev": "nx run-many -t compile -p @opentelemetry/instrumentation-winston",
26
- "compile": "tsc -p ."
20
+ "test": "nyc --no-clean mocha 'test/**/*.test.ts'",
21
+ "test-all-versions": "tav",
22
+ "test-merge-coverage": "nyc merge .nyc_output coverage/coverage-final.json",
23
+ "version:update": "node ../../scripts/version-update.js"
27
24
  },
28
25
  "keywords": [
29
26
  "instrumentation",
@@ -55,7 +52,7 @@
55
52
  "@opentelemetry/context-async-hooks": "^2.0.0",
56
53
  "@opentelemetry/sdk-trace-base": "^2.0.0",
57
54
  "@opentelemetry/sdk-trace-node": "^2.0.0",
58
- "@opentelemetry/winston-transport": "^0.14.0",
55
+ "@opentelemetry/winston-transport": "^0.15.0",
59
56
  "@types/mocha": "10.0.10",
60
57
  "@types/node": "18.18.14",
61
58
  "@types/sinon": "17.0.4",
@@ -69,9 +66,9 @@
69
66
  "winston2": "npm:winston@2.4.7"
70
67
  },
71
68
  "dependencies": {
72
- "@opentelemetry/api-logs": "^0.203.0",
73
- "@opentelemetry/instrumentation": "^0.203.0"
69
+ "@opentelemetry/api-logs": "^0.204.0",
70
+ "@opentelemetry/instrumentation": "^0.204.0"
74
71
  },
75
72
  "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-winston#readme",
76
- "gitHead": "e7960a2061c0a039ffa57ed8dbb73d605d65f4f6"
73
+ "gitHead": "0a45ac1b951d2acd2e40834e7ae012c04820faec"
77
74
  }