Skip to content

Commit

Permalink
readme: remove outdated section about opentracing
Browse files Browse the repository at this point in the history
  • Loading branch information
neelance committed Mar 26, 2017
1 parent 0b143cc commit 36e6c97
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,3 @@ func (r *helloWorldResolver) Hello(ctx context.Context) (string, error) {
return "Hello world!", nil
}
```

### OpenTracing

OpenTracing spans are automatically created for each field of the GraphQL query. Fields are marked as trivial if they have no `context.Context` argument, no field arguments and no `error` result. You can use this to avoid unnecessary clutter in the trace:

```go
type trivialFieldsFilter struct {
rec basictracer.SpanRecorder
}

func (f *trivialFieldsFilter) RecordSpan(span basictracer.RawSpan) {
if b, ok := span.Tags[graphql.OpenTracingTagTrivial].(bool); ok && b {
return
}
f.rec.RecordSpan(span)
}
```

0 comments on commit 36e6c97

Please sign in to comment.