Documentation ¶
Overview ¶
Example ¶
package main import ( "log" "net/http" "github.com/99designs/gqlgen-contrib/gqlopencensus" "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/handler" ) var es graphql.ExecutableSchema func main() { // NOTE: requires setting of Exporter // trace.RegisterExporter(exporter) handler := handler.GraphQL( es, handler.Tracer(gqlopencensus.New()), ) http.Handle("/query", handler) if err := http.ListenAndServe(":8080", nil); err != nil { log.Fatal(err) } }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(cfg *config)
Option is anything that can configure Tracer.
func WithDataDog ¶
func WithDataDog() Option
WithDataDog provides DataDog specific span attrs. see github.com/DataDog/opencensus-go-exporter-datadog
Click to show internal directories.
Click to hide internal directories.