@interopio/insights-traces 0.0.171

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 ADDED
@@ -0,0 +1,9 @@
1
+ # How to build the package
2
+ npm i
3
+ npm run build
4
+
5
+ # How to test the package
6
+ npm run test
7
+
8
+ # How to publish the package
9
+ npm publish
@@ -0,0 +1 @@
1
+ export declare function init(): void;
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = void 0;
4
+ const otel_1 = require("@interopio/otel");
5
+ const api_1 = require("@opentelemetry/api");
6
+ const core_1 = require("@opentelemetry/core");
7
+ const exporter_trace_otlp_http_1 = require("@opentelemetry/exporter-trace-otlp-http");
8
+ const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
9
+ function init() {
10
+ (0, otel_1.registerInsightsPlugin)("traces", () => ({
11
+ get_ROOT_CONTEXT: () => api_1.ROOT_CONTEXT,
12
+ trace: api_1.trace,
13
+ context: api_1.context,
14
+ propagation: api_1.propagation,
15
+ newW3CTraceContextPropagator: () => new core_1.W3CTraceContextPropagator(),
16
+ newBasicTracerProvider: (config) => new sdk_trace_base_1.BasicTracerProvider(config),
17
+ newBatchSpanProcessor: (spanExporter, batchSpanProcessorConfig) => new sdk_trace_base_1.BatchSpanProcessor(spanExporter, batchSpanProcessorConfig),
18
+ newParentBasedSampler: (config) => new sdk_trace_base_1.ParentBasedSampler(config),
19
+ newOTLPTraceExporter: (config) => new exporter_trace_otlp_http_1.OTLPTraceExporter(config),
20
+ newConsoleSpanExporter: () => new sdk_trace_base_1.ConsoleSpanExporter()
21
+ }));
22
+ }
23
+ exports.init = init;
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,0CAAiF;AACjF,4CAA+F;AAC/F,8CAAgE;AAChE,sFAA4E;AAE5E,kEAAmM;AAEnM,SAAgB,IAAI;IAClB,IAAA,6BAAsB,EACpB,QAAQ,EACR,GAAG,EAAE,CAAC,CAAC;QACL,gBAAgB,EAAE,GAAG,EAAE,CAAC,kBAAY;QACpC,KAAK,EAAL,WAAK;QACL,OAAO,EAAP,aAAO;QACP,WAAW,EAAX,iBAAW;QACX,4BAA4B,EAAE,GAAG,EAAE,CAAC,IAAI,gCAAyB,EAAE;QACnE,sBAAsB,EAAE,CAAC,MAAoB,EAAE,EAAE,CAAC,IAAI,oCAAmB,CAAC,MAAM,CAAC;QACjF,qBAAqB,EAAE,CAAC,YAA0B,EAAE,wBAAuC,EAAE,EAAE,CAAC,IAAI,mCAAkB,CAAC,YAAY,EAAE,wBAAwB,CAAC;QAC9J,qBAAqB,EAAE,CAAC,MAEvB,EAAE,EAAE,CAAC,IAAI,mCAAkB,CAAC,MAAM,CAAC;QACpC,oBAAoB,EAAE,CAAC,MAAkC,EAAE,EAAE,CAAC,IAAI,4CAAiB,CAAC,MAAa,CAAC;QAClG,sBAAsB,EAAE,GAAG,EAAE,CAAC,IAAI,oCAAmB,EAAE;KAC7B,CAAA,CAAC,CAAC;AAClC,CAAC;AAjBD,oBAiBC"}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@interopio/insights-traces",
3
+ "version": "0.0.171",
4
+ "description": "io.Insights observability library - traces plugin",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "rimraf dist && tsc -p ./tsconfig.json",
9
+ "build:tests": "tsc -p ./tests/tsconfig.json",
10
+ "preversion": "npm run build && npm run test && npm audit",
11
+ "test": "npm run build:tests && mocha tests/tests/dist/**/*.js --recursive --full-trace --exit"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/InteropIO/otel.git"
16
+ },
17
+ "author": "interop.io",
18
+ "license": "MIT",
19
+ "bugs": {
20
+ "url": "https://github.com/InteropIO/otel/issues"
21
+ },
22
+ "homepage": "https://github.com/InteropIO/otel#readme",
23
+ "publishConfig": {
24
+ "registry": "https://registry.npmjs.org",
25
+ "access": "public"
26
+ },
27
+ "dependencies": {
28
+ "@opentelemetry/exporter-trace-otlp-http": "^0.200.0",
29
+ "@opentelemetry/sdk-trace-base": "^2.0.0"
30
+ },
31
+ "peerDependencies": {
32
+ "@interopio/otel": "~0.0.*"
33
+ },
34
+ "devDependencies": {
35
+ "@types/chai": "~4.3.20",
36
+ "@types/mocha": "~10.0.10",
37
+ "@types/node": "~18.19.86",
38
+ "@typescript-eslint/eslint-plugin": "~7.18.0",
39
+ "@typescript-eslint/parser": "~7.18.0",
40
+ "chai": "~4.5.0",
41
+ "eslint": "~8.57.1",
42
+ "log4js": "~6.9.1",
43
+ "mocha": "~10.8.2",
44
+ "rimraf": "~5.0.10",
45
+ "typescript": "~4.9.5"
46
+ }
47
+ }