Skip to content

OpenTelemetry instrumentation for gqlgen

License

Notifications You must be signed in to change notification settings

zhevron/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

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages