Skip to content

Commit d12970e

Browse files
committed
chore(trace): Trace socket.io
1 parent 7026ab7 commit d12970e

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"@opentelemetry/instrumentation-express": "^0.52.0",
6868
"@opentelemetry/instrumentation-http": "^0.203.0",
6969
"@opentelemetry/instrumentation-nestjs-core": "^0.49.0",
70+
"@opentelemetry/instrumentation-socket.io": "^0.52.3",
7071
"@opentelemetry/instrumentation-typeorm": "^0.4.0",
7172
"@opentelemetry/resources": "^2.0.1",
7273
"@opentelemetry/sdk-node": "^0.203.0",
@@ -98,5 +99,5 @@
9899
"typeorm": "^0.3.25",
99100
"typeorm-naming-strategies": "^4.1.0"
100101
},
101-
"packageManager": "pnpm@10.13.1"
102+
"packageManager": "pnpm@10.17.1"
102103
}

pnpm-lock.yaml

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

src/tracing.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { resourceFromAttributes } from '@opentelemetry/resources';
55
import { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions';
66
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
77
import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
8+
import { SocketIoInstrumentation } from '@opentelemetry/instrumentation-socket.io';
89
import { NestInstrumentation } from '@opentelemetry/instrumentation-nestjs-core';
910
import { TypeormInstrumentation } from '@opentelemetry/instrumentation-typeorm';
1011
import { isEmpty } from 'omniboxd/utils/is-empty';
@@ -47,6 +48,7 @@ if (isTracingEnabled()) {
4748
return excludedUrls.some((url) => req.url?.includes(url)) || false;
4849
},
4950
}),
51+
new SocketIoInstrumentation(),
5052
new ExpressInstrumentation({
5153
ignoreLayersType: [ExpressLayerType.MIDDLEWARE],
5254
}),

0 commit comments

Comments
 (0)