@saidsef/tracing-node 3.6.0 → 3.7.2
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 +4 -2
- package/package.json +3 -2
package/libs/index.mjs
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import {AwsInstrumentation} from '@opentelemetry/instrumentation-aws-sdk';
|
|
20
|
+
import {AsyncHooksContextManager} from '@opentelemetry/context-async-hooks';
|
|
20
21
|
import {BatchSpanProcessor} from '@opentelemetry/sdk-trace-base';
|
|
21
22
|
import {CompositePropagator, W3CBaggagePropagator, W3CTraceContextPropagator} from '@opentelemetry/core';
|
|
22
23
|
import {ConnectInstrumentation} from '@opentelemetry/instrumentation-connect';
|
|
@@ -91,6 +92,7 @@ export function setupTracing(options = {}) {
|
|
|
91
92
|
|
|
92
93
|
// Initialize the tracer provider with propagators
|
|
93
94
|
tracerProvider.register({
|
|
95
|
+
contextManager: new AsyncHooksContextManager().enable(),
|
|
94
96
|
propagator: new CompositePropagator({
|
|
95
97
|
propagators: [
|
|
96
98
|
new W3CTraceContextPropagator(),
|
|
@@ -106,12 +108,12 @@ export function setupTracing(options = {}) {
|
|
|
106
108
|
|
|
107
109
|
// Register instrumentations
|
|
108
110
|
const instrumentations = [
|
|
109
|
-
new HttpInstrumentation({serverName: serviceName,
|
|
111
|
+
new HttpInstrumentation({serverName: serviceName, ignoreIncomingRequestHook,}),
|
|
110
112
|
new ExpressInstrumentation({ ignoreIncomingRequestHook, }),
|
|
111
113
|
new PinoInstrumentation({logHook: (span, record) => {record['trace_id'] = span.spanContext().traceId;record['span_id'] = span.spanContext().spanId;},}),
|
|
112
114
|
new ConnectInstrumentation(),
|
|
113
115
|
new AwsInstrumentation({ sqsExtractContextPropagationFromPayload: true, }),
|
|
114
|
-
new IORedisInstrumentation(
|
|
116
|
+
new IORedisInstrumentation(),
|
|
115
117
|
];
|
|
116
118
|
|
|
117
119
|
if (enableFsInstrumentation) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saidsef/tracing-node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.2",
|
|
4
4
|
"description": "tracing NodeJS - Wrapper for OpenTelemetry instrumentation packages",
|
|
5
5
|
"main": "libs/index.mjs",
|
|
6
6
|
"scripts": {
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
"homepage": "https://github.com/saidsef/tracing-node#readme",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@opentelemetry/api": "^1.9.0",
|
|
34
|
+
"@opentelemetry/context-async-hooks": "^2.0.1",
|
|
34
35
|
"@opentelemetry/exporter-trace-otlp-grpc": "^0.203.0",
|
|
35
36
|
"@opentelemetry/instrumentation": "^0.203.0",
|
|
36
|
-
"@opentelemetry/instrumentation-aws-sdk": "^0.
|
|
37
|
+
"@opentelemetry/instrumentation-aws-sdk": "^0.57.0",
|
|
37
38
|
"@opentelemetry/instrumentation-connect": "^0.47.0",
|
|
38
39
|
"@opentelemetry/instrumentation-dns": "^0.47.0",
|
|
39
40
|
"@opentelemetry/instrumentation-express": "^0.52.0",
|