Skip to content

Commit

Permalink
Fix the usage example (#1949)
Browse files Browse the repository at this point in the history
KnexInstrumentationConfig is just a type
  • Loading branch information
rtpg authored Feb 23, 2024
1 parent 038e0bf commit d0fc194
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugins/node/opentelemetry-instrumentation-knex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install --save @opentelemetry/instrumentation-knex
## Usage

```js
const { KnexInstrumentation, KnexInstrumentationConfig } = require('@opentelemetry/instrumentation-knex');
const { KnexInstrumentation } = require('@opentelemetry/instrumentation-knex');
const { ConsoleSpanExporter, SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base');
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
Expand All @@ -34,11 +34,10 @@ provider.register();

registerInstrumentations({
instrumentations: [
new KnexInstrumentation(
new KnexInstrumentationConfig({
new KnexInstrumentation({
maxQueryLength: 100,
})
)],
],
tracerProvider: provider,
});
```
Expand Down

0 comments on commit d0fc194

Please sign in to comment.