Documentation ¶
Overview ¶
Package oteltracing provides a gqlgen middleware that adds otel tracing.
You can use it like:
srv := handler.New(es) srv.Use(oteltracing.Tracer{})
If you would like spans for every field in the response you can enable FieldSpans:
srv := handler.New(es) srv.Use(oteltracing.Tracer{FieldSpans: true})
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tracer ¶
type Tracer struct { // FieldSpans allow you to enable a span for each field in the response FieldSpans bool }
Tracer provides an otel tracer for gqlgen servers
func (Tracer) ExtensionName ¶
ExtensionName returns the name of this extension
func (Tracer) InterceptField ¶
InterceptField adds the middleware that lets us add traces to each field of a request
Click to show internal directories.
Click to hide internal directories.