Skip to content

Commit

Permalink
chore: fix readme example
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarchaud committed Jan 5, 2021
1 parent 1d09926 commit 41f11d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/opentelemetry-instrumentation-grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ To load a specific instrumentation (**gRPC** in this case), specify it in the No

```javascript
const { NodeTracerProvider } = require('@opentelemetry/node');
const { GrpcInstrumentation } = require('@opentelemetry/instrumentation-grpc');

const provider = new NodeTracerProvider({
// be sure to disable old plugin
Expand All @@ -33,10 +34,10 @@ const provider = new NodeTracerProvider({
},
});

const httpInstrumentation = new HttpInstrumentation({
const grpcInstrumentation = new GrpcInstrumentation({
// see under for available configuration
});
httpInstrumentation.enable();
grpcInstrumentation.enable();

provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
provider.register();
Expand Down

0 comments on commit 41f11d8

Please sign in to comment.