@opentelemetry/winston-transport 0.12.0 → 0.14.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
@@ -17,7 +17,7 @@ npm install --save @opentelemetry/winston-transport
17
17
 
18
18
  This package exports the Winston transport class that is used to send records to the
19
19
  OpenTelemetry Logs SDK. It can be used directly when configuring a Winston logger. If using
20
- [`@opentelemetry/instrumenation-winston`](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-winston)
20
+ [`@opentelemetry/instrumenation-winston`](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-winston)
21
21
  package there is no need to instantiate the transport as the instrumentation will take care of that.
22
22
  For example:
23
23
 
@@ -33,11 +33,10 @@ const winston = require('winston');
33
33
 
34
34
 
35
35
  // To start a logger, you first need to initialize the Logger provider.
36
- const loggerProvider = new LoggerProvider();
37
- // Add a processor to export log record
38
- loggerProvider.addLogRecordProcessor(
39
- new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())
40
- );
36
+ // And add a processor to export log record.
37
+ const loggerProvider = new LoggerProvider({
38
+ processors: [new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())],
39
+ });
41
40
  logsAPI.logs.setGlobalLoggerProvider(loggerProvider);
42
41
 
43
42
  const logger = winston.createLogger({
@@ -1,3 +1,3 @@
1
- export declare const PACKAGE_VERSION = "0.12.0";
1
+ export declare const PACKAGE_VERSION = "0.14.0";
2
2
  export declare const PACKAGE_NAME = "@opentelemetry/winston-transport";
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.12.0';
20
+ exports.PACKAGE_VERSION = '0.14.0';
21
21
  exports.PACKAGE_NAME = '@opentelemetry/winston-transport';
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,kCAAkC,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.12.0';\nexport const PACKAGE_NAME = '@opentelemetry/winston-transport';\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,kCAAkC,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.14.0';\nexport const PACKAGE_NAME = '@opentelemetry/winston-transport';\n"]}
package/package.json CHANGED
@@ -1,19 +1,23 @@
1
1
  {
2
2
  "name": "@opentelemetry/winston-transport",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "OpenTelemetry Transport for winston",
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/winston-transport"
11
+ },
8
12
  "scripts": {
9
13
  "test": "nyc mocha 'test/**/*.test.ts'",
10
14
  "tdd": "npm run test -- --watch-extensions ts --watch",
11
15
  "clean": "rimraf build/*",
12
16
  "lint": "eslint . --ext .ts",
13
17
  "lint:fix": "eslint . --ext .ts --fix",
14
- "prewatch": "npm run precompile",
15
18
  "prepublishOnly": "npm run compile",
16
19
  "version:update": "node ../../scripts/version-update.js",
20
+ "setup:dev": "nx run-many -t compile -p @opentelemetry/winston-transport",
17
21
  "compile": "tsc -p ."
18
22
  },
19
23
  "keywords": [
@@ -47,9 +51,9 @@
47
51
  "typescript": "5.0.4"
48
52
  },
49
53
  "dependencies": {
50
- "@opentelemetry/api-logs": "^0.201.0",
54
+ "@opentelemetry/api-logs": "^0.203.0",
51
55
  "winston-transport": "4.*"
52
56
  },
53
57
  "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/winston-transport#readme",
54
- "gitHead": "393b51596dc869983a03ce8857658029ca122a15"
58
+ "gitHead": "e7960a2061c0a039ffa57ed8dbb73d605d65f4f6"
55
59
  }