-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Schmidt
committed
Aug 19, 2018
1 parent
906d2ed
commit 7623679
Showing
8 changed files
with
5,412 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
* | ||
!src/**/* | ||
!dist/**/* | ||
dist/**/*.test.* | ||
!package.json | ||
!README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
+ })] | ||
}) | ||
) | ||
``` |
Oops, something went wrong.