Skip to content

Commit 6e88307

Browse files
committed
🧹 doc(integration/opentelemetry): add instrumentation guide
1 parent d928359 commit 6e88307

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

docs/integrations/opentelemetry.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,12 @@ To achieve this in Bun, we can
9191
Let's create a new file in `src/instrumentation.ts`
9292

9393
```ts [src/instrumentation.ts]
94-
import { Elysia } from 'elysia'
95-
9694
import { opentelemetry } from '@elysiajs/opentelemetry'
9795
import { PgInstrumentation } from '@opentelemetry/instrumentation-pg'
9896

99-
export const instrumentation = new Elysia().use(
100-
opentelemetry({
101-
instrumentations: [new PgInstrumentation()]
102-
})
103-
)
97+
export const instrumentation = opentelemetry({
98+
instrumentations: [new PgInstrumentation()]
99+
})
104100
```
105101

106102
Then we can apply this `instrumentaiton` plugin into our main instance in `src/index.ts`

0 commit comments

Comments
 (0)