Skip to content

Commit 5e23b72

Browse files
authored
chore: update instrumentations order (#282)
1 parent ca9d24c commit 5e23b72

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

libs/index.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import {BatchSpanProcessor} from '@opentelemetry/sdk-trace-base';
2222
import {CompositePropagator, W3CBaggagePropagator, W3CTraceContextPropagator} from '@opentelemetry/core';
2323
import {ConnectInstrumentation} from '@opentelemetry/instrumentation-connect';
2424
import {diag, DiagConsoleLogger, DiagLogLevel} from '@opentelemetry/api';
25+
import {HttpInstrumentation} from '@opentelemetry/instrumentation-http';
2526
import {DnsInstrumentation} from '@opentelemetry/instrumentation-dns';
2627
import {ExpressInstrumentation} from '@opentelemetry/instrumentation-express';
27-
import {HttpInstrumentation} from '@opentelemetry/instrumentation-http';
2828
import {NodeTracerProvider} from '@opentelemetry/sdk-trace-node';
2929
import {OTLPTraceExporter} from '@opentelemetry/exporter-trace-otlp-grpc';
3030
import {PinoInstrumentation} from '@opentelemetry/instrumentation-pino';
@@ -108,12 +108,12 @@ export function setupTracing(options = {}) {
108108

109109
// Register instrumentations
110110
const instrumentations = [
111-
new PinoInstrumentation(),
112-
new HttpInstrumentation({ requireParentforOutgoingSpans: false, requireParentforIncomingSpans: false, ignoreIncomingRequestHook, }),
111+
new HttpInstrumentation({ serverName: serviceName, requireParentforOutgoingSpans: false, requireParentforIncomingSpans: false, ignoreIncomingRequestHook, }),
113112
new ExpressInstrumentation({ ignoreIncomingRequestHook, }),
113+
new PinoInstrumentation(),
114114
new ConnectInstrumentation(),
115115
new AwsInstrumentation({ sqsExtractContextPropagationFromPayload: true, }),
116-
new IORedisInstrumentation(),
116+
new IORedisInstrumentation({ requireParentSpan: false, }),
117117
];
118118

119119
if (enableFsInstrumentation) {

package-lock.json

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@saidsef/tracing-node",
3-
"version": "3.4.6",
3+
"version": "3.4.7",
44
"description": "tracing NodeJS - Wrapper for OpenTelemetry instrumentation packages",
55
"main": "libs/index.mjs",
66
"scripts": {

0 commit comments

Comments
 (0)