@saidsef/tracing-node 3.4.3 → 3.4.5
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/libs/index.mjs +11 -9
- package/package.json +2 -2
package/libs/index.mjs
CHANGED
|
@@ -24,14 +24,14 @@ import {ConnectInstrumentation} from '@opentelemetry/instrumentation-connect';
|
|
|
24
24
|
import {diag, DiagConsoleLogger, DiagLogLevel} from '@opentelemetry/api';
|
|
25
25
|
import {DnsInstrumentation} from '@opentelemetry/instrumentation-dns';
|
|
26
26
|
import {ExpressInstrumentation} from '@opentelemetry/instrumentation-express';
|
|
27
|
-
import {FastifyInstrumentation} from '@opentelemetry/instrumentation-fastify';
|
|
28
27
|
import {HttpInstrumentation} from '@opentelemetry/instrumentation-http';
|
|
29
28
|
import {NodeTracerProvider} from '@opentelemetry/sdk-trace-node';
|
|
30
29
|
import {OTLPTraceExporter} from '@opentelemetry/exporter-trace-otlp-grpc';
|
|
31
30
|
import {PinoInstrumentation} from '@opentelemetry/instrumentation-pino';
|
|
32
31
|
import {IORedisInstrumentation} from '@opentelemetry/instrumentation-ioredis';
|
|
33
32
|
import {registerInstrumentations} from '@opentelemetry/instrumentation';
|
|
34
|
-
import {
|
|
33
|
+
import { FsInstrumentation } from '@opentelemetry/instrumentation-fs';
|
|
34
|
+
import {Resource, detectResourcesSync, envDetector, hostDetector, osDetector, processDetector} from '@opentelemetry/resources';
|
|
35
35
|
import {ATTR_SERVICE_NAME} from '@opentelemetry/semantic-conventions';
|
|
36
36
|
import {ATTR_CONTAINER_NAME} from '@opentelemetry/semantic-conventions/incubating';
|
|
37
37
|
|
|
@@ -75,11 +75,13 @@ export function setupTracing(options = {}) {
|
|
|
75
75
|
|
|
76
76
|
tracerProvider = new NodeTracerProvider({
|
|
77
77
|
spanProcessors: [spanProcessor],
|
|
78
|
-
resource:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
resource: new Resource({
|
|
79
|
+
[ATTR_SERVICE_NAME]: serviceName,
|
|
80
|
+
[ATTR_CONTAINER_NAME]: hostname,
|
|
81
|
+
}).merge(
|
|
82
|
+
detectResourcesSync({
|
|
83
|
+
detectors: [envDetector, hostDetector, osDetector, processDetector]
|
|
84
|
+
})
|
|
83
85
|
),
|
|
84
86
|
});
|
|
85
87
|
|
|
@@ -106,12 +108,12 @@ export function setupTracing(options = {}) {
|
|
|
106
108
|
instrumentations: [
|
|
107
109
|
new PinoInstrumentation(),
|
|
108
110
|
new HttpInstrumentation({ requireParentforOutgoingSpans: false, requireParentforIncomingSpans: false, ignoreIncomingRequestHook, }),
|
|
109
|
-
new FastifyInstrumentation(),
|
|
110
111
|
new ExpressInstrumentation({ ignoreIncomingRequestHook, }),
|
|
111
112
|
new ConnectInstrumentation(),
|
|
112
113
|
new AwsInstrumentation({ sqsExtractContextPropagationFromPayload: true, }),
|
|
113
|
-
new DnsInstrumentation(),
|
|
114
114
|
new IORedisInstrumentation(),
|
|
115
|
+
new FsInstrumentation(),
|
|
116
|
+
new DnsInstrumentation(),
|
|
115
117
|
],
|
|
116
118
|
});
|
|
117
119
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saidsef/tracing-node",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.5",
|
|
4
4
|
"description": "tracing NodeJS - Wrapper for OpenTelemetry instrumentation packages",
|
|
5
5
|
"main": "libs/index.mjs",
|
|
6
6
|
"scripts": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@opentelemetry/instrumentation-connect": "^0.44.0",
|
|
38
38
|
"@opentelemetry/instrumentation-dns": "^0.44.0",
|
|
39
39
|
"@opentelemetry/instrumentation-express": "^0.48.0",
|
|
40
|
-
"@opentelemetry/instrumentation-
|
|
40
|
+
"@opentelemetry/instrumentation-fs": "^0.20.0",
|
|
41
41
|
"@opentelemetry/instrumentation-http": "^0.200.0",
|
|
42
42
|
"@opentelemetry/instrumentation-ioredis": "^0.48.0",
|
|
43
43
|
"@opentelemetry/instrumentation-pino": "^0.47.0",
|