Skip to content

Commit

Permalink
feat: add socket.io instrumentation (open-telemetry#1284)
Browse files Browse the repository at this point in the history
  • Loading branch information
mottibec authored Nov 22, 2022
1 parent 59fa57c commit f865143
Show file tree
Hide file tree
Showing 22 changed files with 1,523 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ components:
- rauno56
plugins/node/opentelemetry-instrumentation-pg:
- rauno56
plugins/node/opentelemetry-instrumentation-socket.io:
- mottibec
- rauno56
plugins/web/opentelemetry-instrumentation-document-load:
- obecny
plugins/web/opentelemetry-instrumentation-long-task:
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.27.3","detectors/node/opentelemetry-resource-detector-aws":"1.2.1","detectors/node/opentelemetry-resource-detector-container":"0.2.1","detectors/node/opentelemetry-resource-detector-gcp":"0.27.4","detectors/node/opentelemetry-resource-detector-github":"0.27.0","detectors/node/opentelemetry-resource-detector-instana":"0.4.0","metapackages/auto-instrumentations-node":"0.35.0","metapackages/auto-instrumentations-web":"0.31.0","packages/opentelemetry-host-metrics":"0.31.0","packages/opentelemetry-id-generator-aws-xray":"1.1.1","packages/opentelemetry-propagation-utils":"0.29.1","packages/opentelemetry-test-utils":"0.33.0","plugins/node/instrumentation-amqplib":"0.32.0","plugins/node/instrumentation-dataloader":"0.3.0","plugins/node/instrumentation-fs":"0.6.0","plugins/node/instrumentation-lru-memoizer":"0.32.0","plugins/node/instrumentation-mongoose":"0.32.0","plugins/node/instrumentation-tedious":"0.5.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.34.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.10.0","plugins/node/opentelemetry-instrumentation-bunyan":"0.31.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.32.0","plugins/node/opentelemetry-instrumentation-connect":"0.31.0","plugins/node/opentelemetry-instrumentation-dns":"0.31.0","plugins/node/opentelemetry-instrumentation-express":"0.32.0","plugins/node/opentelemetry-instrumentation-fastify":"0.31.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.31.0","plugins/node/opentelemetry-instrumentation-graphql":"0.33.0","plugins/node/opentelemetry-instrumentation-hapi":"0.31.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.33.0","plugins/node/opentelemetry-instrumentation-knex":"0.31.0","plugins/node/opentelemetry-instrumentation-koa":"0.34.0","plugins/node/opentelemetry-instrumentation-memcached":"0.31.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.33.0","plugins/node/opentelemetry-instrumentation-mysql":"0.32.0","plugins/node/opentelemetry-instrumentation-mysql2":"0.33.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.32.0","plugins/node/opentelemetry-instrumentation-net":"0.31.0","plugins/node/opentelemetry-instrumentation-pg":"0.33.0","plugins/node/opentelemetry-instrumentation-pino":"0.33.0","plugins/node/opentelemetry-instrumentation-redis":"0.34.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.34.0","plugins/node/opentelemetry-instrumentation-restify":"0.31.0","plugins/node/opentelemetry-instrumentation-router":"0.32.0","plugins/node/opentelemetry-instrumentation-winston":"0.31.0","plugins/web/opentelemetry-instrumentation-document-load":"0.31.0","plugins/web/opentelemetry-instrumentation-long-task":"0.32.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.32.0","plugins/web/opentelemetry-plugin-react-load":"0.28.1","propagators/opentelemetry-propagator-aws-xray":"1.1.1","propagators/opentelemetry-propagator-grpc-census-binary":"0.26.0","propagators/opentelemetry-propagator-instana":"0.2.1","propagators/opentelemetry-propagator-ot-trace":"0.26.2"}
{"detectors/node/opentelemetry-resource-detector-alibaba-cloud":"0.27.3","detectors/node/opentelemetry-resource-detector-aws":"1.2.1","detectors/node/opentelemetry-resource-detector-container":"0.2.1","detectors/node/opentelemetry-resource-detector-gcp":"0.27.4","detectors/node/opentelemetry-resource-detector-github":"0.27.0","detectors/node/opentelemetry-resource-detector-instana":"0.4.0","metapackages/auto-instrumentations-node":"0.35.0","metapackages/auto-instrumentations-web":"0.31.0","packages/opentelemetry-host-metrics":"0.31.0","packages/opentelemetry-id-generator-aws-xray":"1.1.1","packages/opentelemetry-propagation-utils":"0.29.1","packages/opentelemetry-test-utils":"0.33.0","plugins/node/instrumentation-amqplib":"0.32.0","plugins/node/instrumentation-dataloader":"0.3.0","plugins/node/instrumentation-fs":"0.6.0","plugins/node/instrumentation-lru-memoizer":"0.32.0","plugins/node/instrumentation-mongoose":"0.32.0", "plugins/node/instrumentation-socket.io": "0.32.0","plugins/node/instrumentation-tedious":"0.5.0","plugins/node/opentelemetry-instrumentation-aws-lambda":"0.34.0","plugins/node/opentelemetry-instrumentation-aws-sdk":"0.10.0","plugins/node/opentelemetry-instrumentation-bunyan":"0.31.0","plugins/node/opentelemetry-instrumentation-cassandra":"0.32.0","plugins/node/opentelemetry-instrumentation-connect":"0.31.0","plugins/node/opentelemetry-instrumentation-dns":"0.31.0","plugins/node/opentelemetry-instrumentation-express":"0.32.0","plugins/node/opentelemetry-instrumentation-fastify":"0.31.0","plugins/node/opentelemetry-instrumentation-generic-pool":"0.31.0","plugins/node/opentelemetry-instrumentation-graphql":"0.33.0","plugins/node/opentelemetry-instrumentation-hapi":"0.31.0","plugins/node/opentelemetry-instrumentation-ioredis":"0.33.0","plugins/node/opentelemetry-instrumentation-knex":"0.31.0","plugins/node/opentelemetry-instrumentation-koa":"0.34.0","plugins/node/opentelemetry-instrumentation-memcached":"0.31.0","plugins/node/opentelemetry-instrumentation-mongodb":"0.33.0","plugins/node/opentelemetry-instrumentation-mysql":"0.32.0","plugins/node/opentelemetry-instrumentation-mysql2":"0.33.0","plugins/node/opentelemetry-instrumentation-nestjs-core":"0.32.0","plugins/node/opentelemetry-instrumentation-net":"0.31.0","plugins/node/opentelemetry-instrumentation-pg":"0.33.0","plugins/node/opentelemetry-instrumentation-pino":"0.33.0","plugins/node/opentelemetry-instrumentation-redis":"0.34.0","plugins/node/opentelemetry-instrumentation-redis-4":"0.34.0","plugins/node/opentelemetry-instrumentation-restify":"0.31.0","plugins/node/opentelemetry-instrumentation-router":"0.32.0","plugins/node/opentelemetry-instrumentation-winston":"0.31.0","plugins/web/opentelemetry-instrumentation-document-load":"0.31.0","plugins/web/opentelemetry-instrumentation-long-task":"0.32.0","plugins/web/opentelemetry-instrumentation-user-interaction":"0.32.0","plugins/web/opentelemetry-plugin-react-load":"0.28.1","propagators/opentelemetry-propagator-aws-xray":"1.1.1","propagators/opentelemetry-propagator-grpc-census-binary":"0.26.0","propagators/opentelemetry-propagator-instana":"0.2.1","propagators/opentelemetry-propagator-ot-trace":"0.26.2"}

1 change: 1 addition & 0 deletions metapackages/auto-instrumentations-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ registerInstrumentations({
- [@opentelemetry/instrumentation-pino](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-pino)
- [@opentelemetry/instrumentation-redis](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-redis)
- [@opentelemetry/instrumentation-restify](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-restify)
- [@opentelemetry/instrumentation-socket.io](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-socket.io)
- [@opentelemetry/instrumentation-winston](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-winston)

## Useful links
Expand Down
1 change: 1 addition & 0 deletions metapackages/auto-instrumentations-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"@opentelemetry/instrumentation-redis-4": "^0.34.0",
"@opentelemetry/instrumentation-restify": "^0.31.0",
"@opentelemetry/instrumentation-router": "^0.32.0",
"@opentelemetry/instrumentation-socket.io": "^0.32.0",
"@opentelemetry/instrumentation-tedious": "^0.5.0",
"@opentelemetry/instrumentation-winston": "^0.31.0"
}
Expand Down
2 changes: 2 additions & 0 deletions metapackages/auto-instrumentations-node/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import { RedisInstrumentation as RedisInstrumentationV2 } from '@opentelemetry/i
import { RedisInstrumentation as RedisInstrumentationV4 } from '@opentelemetry/instrumentation-redis-4';
import { RestifyInstrumentation } from '@opentelemetry/instrumentation-restify';
import { RouterInstrumentation } from '@opentelemetry/instrumentation-router';
import { SocketIoInstrumentation } from '@opentelemetry/instrumentation-socket.io';
import { TediousInstrumentation } from '@opentelemetry/instrumentation-tedious';
import { WinstonInstrumentation } from '@opentelemetry/instrumentation-winston';

Expand Down Expand Up @@ -88,6 +89,7 @@ const InstrumentationMap = {
'@opentelemetry/instrumentation-redis-4': RedisInstrumentationV4,
'@opentelemetry/instrumentation-restify': RestifyInstrumentation,
'@opentelemetry/instrumentation-router': RouterInstrumentation,
'@opentelemetry/instrumentation-socket.io': SocketIoInstrumentation,
'@opentelemetry/instrumentation-tedious': TediousInstrumentation,
'@opentelemetry/instrumentation-winston': WinstonInstrumentation,
};
Expand Down
1 change: 1 addition & 0 deletions plugins/node/instrumentation-socket.io/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
7 changes: 7 additions & 0 deletions plugins/node/instrumentation-socket.io/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"env": {
"mocha": true,
"node": true
},
...require('../../../eslint.config.js')
}
4 changes: 4 additions & 0 deletions plugins/node/instrumentation-socket.io/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/bin
/coverage
/doc
/test
15 changes: 15 additions & 0 deletions plugins/node/instrumentation-socket.io/.tav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'socket.io':
- versions: "2.1.1 || 2.2.0 || 2.3.0 || 2.4.0 || ^2.5.0"
peerDependencies: socket.io-client@^2
commands:
- npm run test

- versions: "^3.1.3"
peerDependencies: socket.io-client@^3
commands:
- npm run test

- versions: "4.4.1 || 4.5.1 || 4.5.2 || ^4.5.3"
peerDependencies: socket.io-client@^4
commands:
- npm run test
Loading

0 comments on commit f865143

Please sign in to comment.