@opentelemetry/instrumentation-winston 0.46.0 → 0.48.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
@@ -38,11 +38,10 @@ const tracerProvider = new NodeTracerProvider();
38
38
  tracerProvider.register();
39
39
 
40
40
  // To start a logger, you first need to initialize the Logger provider.
41
- const loggerProvider = new LoggerProvider();
42
- // Add a processor to export log record
43
- loggerProvider.addLogRecordProcessor(
44
- new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())
45
- );
41
+ // Add a processor to export log record.
42
+ const loggerProvider = new LoggerProvider({
43
+ processors: [new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())],
44
+ });
46
45
  logsAPI.logs.setGlobalLoggerProvider(loggerProvider);
47
46
 
48
47
  registerInstrumentations({
@@ -122,11 +121,10 @@ const winston = require('winston');
122
121
 
123
122
 
124
123
  // To start a logger, you first need to initialize the Logger provider.
125
- const loggerProvider = new LoggerProvider();
126
124
  // Add a processor to export log record
127
- loggerProvider.addLogRecordProcessor(
128
- new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())
129
- );
125
+ const loggerProvider = new LoggerProvider({
126
+ processors: [new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())],
127
+ });
130
128
  logsAPI.logs.setGlobalLoggerProvider(loggerProvider);
131
129
 
132
130
  const logger = winston.createLogger({
@@ -1,3 +1,3 @@
1
- export * from './instrumentation';
2
- export * from './types';
1
+ export { WinstonInstrumentation } from './instrumentation';
2
+ export type { LogHookFunction, WinstonInstrumentationConfig } from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -14,21 +14,8 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
- };
31
17
  Object.defineProperty(exports, "__esModule", { value: true });
32
- __exportStar(require("./instrumentation"), exports);
33
- __exportStar(require("./types"), exports);
18
+ exports.WinstonInstrumentation = void 0;
19
+ var instrumentation_1 = require("./instrumentation");
20
+ Object.defineProperty(exports, "WinstonInstrumentation", { enumerable: true, get: function () { return instrumentation_1.WinstonInstrumentation; } });
34
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,0CAAwB","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 * from './instrumentation';\nexport * from './types';\n"]}
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,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "0.46.0";
1
+ export declare const PACKAGE_VERSION = "0.48.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.46.0';
20
+ exports.PACKAGE_VERSION = '0.48.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.46.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.48.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-winston';\n"]}
package/package.json CHANGED
@@ -1,10 +1,14 @@
1
1
  {
2
2
  "name": "@opentelemetry/instrumentation-winston",
3
- "version": "0.46.0",
3
+ "version": "0.48.0",
4
4
  "description": "OpenTelemetry instrumentation for `winston` logger",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",
7
- "repository": "open-telemetry/opentelemetry-js-contrib",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/open-telemetry/opentelemetry-js-contrib.git",
10
+ "directory": "packages/instrumentation-winston"
11
+ },
8
12
  "scripts": {
9
13
  "test": "npm run test-v1-v2 && npm run test-v3 && nyc merge .nyc_output ./coverage/coverage-final.json",
10
14
  "test-v1-v2": "tav winston 2.4.7 npm run test-run",
@@ -15,10 +19,10 @@
15
19
  "clean": "rimraf build/*",
16
20
  "lint": "eslint . --ext .ts",
17
21
  "lint:fix": "eslint . --ext .ts --fix",
18
- "lint:readme": "node ../../../scripts/lint-readme.js",
19
- "prewatch": "npm run precompile",
22
+ "lint:readme": "node ../../scripts/lint-readme.js",
20
23
  "prepublishOnly": "npm run compile",
21
- "version:update": "node ../../../scripts/version-update.js",
24
+ "version:update": "node ../../scripts/version-update.js",
25
+ "setup:dev": "nx run-many -t compile -p @opentelemetry/instrumentation-winston",
22
26
  "compile": "tsc -p ."
23
27
  },
24
28
  "keywords": [
@@ -51,7 +55,7 @@
51
55
  "@opentelemetry/context-async-hooks": "^2.0.0",
52
56
  "@opentelemetry/sdk-trace-base": "^2.0.0",
53
57
  "@opentelemetry/sdk-trace-node": "^2.0.0",
54
- "@opentelemetry/winston-transport": "^0.12.0",
58
+ "@opentelemetry/winston-transport": "^0.14.0",
55
59
  "@types/mocha": "10.0.10",
56
60
  "@types/node": "18.18.14",
57
61
  "@types/sinon": "17.0.4",
@@ -65,9 +69,9 @@
65
69
  "winston2": "npm:winston@2.4.7"
66
70
  },
67
71
  "dependencies": {
68
- "@opentelemetry/api-logs": "^0.201.0",
69
- "@opentelemetry/instrumentation": "^0.201.0"
72
+ "@opentelemetry/api-logs": "^0.203.0",
73
+ "@opentelemetry/instrumentation": "^0.203.0"
70
74
  },
71
- "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-winston#readme",
72
- "gitHead": "393b51596dc869983a03ce8857658029ca122a15"
75
+ "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-winston#readme",
76
+ "gitHead": "e7960a2061c0a039ffa57ed8dbb73d605d65f4f6"
73
77
  }