Skip to content

Commit

Permalink
Add support for the restify package (#807)
Browse files Browse the repository at this point in the history
- Add the OpenTelemetry instrumentation.
- Add a test app.

Requires an extension updates before it will report any data.

Part of #787
  • Loading branch information
tombruijn authored Nov 30, 2022
1 parent 5d5a4d7 commit 8c1bd31
Show file tree
Hide file tree
Showing 19 changed files with 4,916 additions and 76 deletions.
6 changes: 6 additions & 0 deletions .changesets/support-restify-package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: "patch"
type: "add"
---

Add support for the [restify package](https://www.npmjs.com/package/restify).
195 changes: 119 additions & 76 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@opentelemetry/instrumentation-pg": "^0.33.0",
"@opentelemetry/instrumentation-redis": "^0.34.0",
"@opentelemetry/instrumentation-redis-4": "^0.34.0",
"@opentelemetry/instrumentation-restify": "^0.31.0",
"@opentelemetry/sdk-node": "^0.34.0",
"@opentelemetry/sdk-trace-base": "^1.8.0",
"@prisma/instrumentation": "^4.4.0",
Expand Down
2 changes: 2 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { PrismaInstrumentation } from "@prisma/instrumentation"
import { RedisDbStatementSerializer } from "./instrumentation/redis/serializer"
import { RedisInstrumentation as Redis4Instrumentation } from "@opentelemetry/instrumentation-redis-4"
import { RedisInstrumentation } from "@opentelemetry/instrumentation-redis"
import { RestifyInstrumentation } from "@opentelemetry/instrumentation-restify"
import { SpanProcessor, TestModeSpanProcessor } from "./span_processor"
import { KoaLayerType } from "@opentelemetry/instrumentation-koa"

Expand All @@ -53,6 +54,7 @@ const DefaultInstrumentations = {
"@opentelemetry/instrumentation-pg": PgInstrumentation,
"@opentelemetry/instrumentation-redis": RedisInstrumentation,
"@opentelemetry/instrumentation-redis-4": Redis4Instrumentation,
"@opentelemetry/instrumentation-restify": RestifyInstrumentation,
"@prisma/instrumentation": PrismaInstrumentation
}

Expand Down
1 change: 1 addition & 0 deletions test/restify/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
5 changes: 5 additions & 0 deletions test/restify/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:16

COPY run.sh /

ENTRYPOINT ["sh", "/run.sh"]
Loading

0 comments on commit 8c1bd31

Please sign in to comment.