@midwayjs/otel 3.11.0 → 3.11.1
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 +4 -6
- package/package.json +7 -9
package/README.md
CHANGED
|
@@ -27,18 +27,16 @@ you can add at `bootstrap.js`.
|
|
|
27
27
|
|
|
28
28
|
```typescript
|
|
29
29
|
const process = require('process');
|
|
30
|
-
const
|
|
30
|
+
const { NodeSDK, node, resources } = require('@opentelemetry/sdk-node');
|
|
31
31
|
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
|
|
32
|
-
const { ConsoleSpanExporter } = require('@opentelemetry/sdk-trace-base');
|
|
33
|
-
const { Resource } = require('@opentelemetry/resources');
|
|
34
32
|
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
|
|
35
33
|
const { Bootstrap } = require('@midwayjs/bootstrap');
|
|
36
34
|
|
|
37
35
|
// configure the SDK to export telemetry data to the console
|
|
38
36
|
// enable all auto-instrumentations from the meta package
|
|
39
|
-
const traceExporter = new ConsoleSpanExporter();
|
|
40
|
-
const sdk = new
|
|
41
|
-
resource: new Resource({
|
|
37
|
+
const traceExporter = new node.ConsoleSpanExporter();
|
|
38
|
+
const sdk = new NodeSDK({
|
|
39
|
+
resource: new resources.Resource({
|
|
42
40
|
[SemanticResourceAttributes.SERVICE_NAME]: 'my-service',
|
|
43
41
|
}),
|
|
44
42
|
traceExporter,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/otel",
|
|
3
3
|
"description": "midway open telemetry component",
|
|
4
|
-
"version": "3.11.
|
|
4
|
+
"version": "3.11.1",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -10,15 +10,13 @@
|
|
|
10
10
|
"index.d.ts"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@midwayjs/core": "^3.11.
|
|
14
|
-
"@midwayjs/koa": "^3.11.
|
|
15
|
-
"@midwayjs/mock": "^3.11.
|
|
16
|
-
"@opentelemetry/
|
|
17
|
-
"@opentelemetry/sdk-trace-base": "^1.0.1",
|
|
18
|
-
"@opentelemetry/sdk-trace-node": "^1.0.1"
|
|
13
|
+
"@midwayjs/core": "^3.11.1",
|
|
14
|
+
"@midwayjs/koa": "^3.11.1",
|
|
15
|
+
"@midwayjs/mock": "^3.11.1",
|
|
16
|
+
"@opentelemetry/sdk-node": "^0.37.0"
|
|
19
17
|
},
|
|
20
18
|
"dependencies": {
|
|
21
|
-
"@opentelemetry/api": "^1.
|
|
19
|
+
"@opentelemetry/api": "^1.4.1"
|
|
22
20
|
},
|
|
23
21
|
"keywords": [
|
|
24
22
|
"tracing",
|
|
@@ -41,5 +39,5 @@
|
|
|
41
39
|
"type": "git",
|
|
42
40
|
"url": "https://github.com/midwayjs/midway.git"
|
|
43
41
|
},
|
|
44
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "bd9375874eb8cfaa49fbcfaa0497021cea06a394"
|
|
45
43
|
}
|