Skip to content

Commit

Permalink
🚀🚀🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Schmidt committed Aug 19, 2018
1 parent 906d2ed commit 7623679
Show file tree
Hide file tree
Showing 8 changed files with 5,412 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*
!src/**/*
!dist/**/*
dist/**/*.test.*
!package.json
!README.md
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# apollo-opentracing

## Installation

Run `npm install --save apollo-opentracing` given that you already setup an opentracing tracer accordingly

## Setup

We need three types of tracer (which could be identical if you like):

- server: Only used for the root (the first span we will start)
- local: Used to start every other span

```diff
+const opentracingExtension = require("apollo-opentracing");
const {serverTracer, localTracer} = require("./tracer);

app.use(
"/graphql",
bodyParser.json(),
graphqlExpress({
schema,
+ extensions: [opentracingExtension({
+ server: serverTracer,
+ local: localTracer,
+ })]
})
)
```
Loading

0 comments on commit 7623679

Please sign in to comment.