Skip to content

withtally/gqlgen-opentelemetry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenTelemetry instrumentation for gqlgen

Build Status Go Reference

This library provides OpenTelemetry (OTEL) instrumentation for gqlgen server requests.

Installation

Add the package to your project:

go get github.com/zhevron/gqlgen-opentelemetry

Usage

Add the gqlgen_opentelemetry.Tracer extension to your server:

h := handler.NewDefaultServer(schema)
h.Use(gqlgen_opentelemetry.Tracer{})

Options

The following options are available on the extension:

IncludeFieldSpans: Whether to create an additional child span for each field requested. (Default: false)

IncludeVariables: Whether to include variables and their values in the trace span attributes. (Default: false)

TracerProvider: The OTEL tracer provider to instantiate a tracer from. If none is provided, the global OTEL tracer provider will be used.

About

OpenTelemetry instrumentation for gqlgen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%