traces

package
v0.0.0-...-3273997 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OtlpEndpoint           string `envconfig:"OTEL_EXPORTER_OTLP_ENDPOINT" default:""`
	ApplicationSlug        string `envconfig:"SLUG" default:"feed"`
	ApplicationEnvironment string `envconfig:"ENV" default:"default"`
}

type GraphqlTracer

type GraphqlTracer struct {
	DisableNonResolverBindingTrace bool
	OperationName                  string
	// contains filtered or unexported fields
}

func NewTraceExtension

func NewTraceExtension(provider ShutdownTracerProvider) *GraphqlTracer

func (GraphqlTracer) ExtensionName

func (a GraphqlTracer) ExtensionName() string

func (GraphqlTracer) InterceptField

func (a GraphqlTracer) InterceptField(ctx context.Context, next graphql.Resolver) (interface{}, error)

func (GraphqlTracer) InterceptOperation

func (GraphqlTracer) Validate

type OtlpTracerProvider

type OtlpTracerProvider struct {
	*tracesdk.TracerProvider
}

func (*OtlpTracerProvider) Shutdown

func (p *OtlpTracerProvider) Shutdown(ctx context.Context) error

func (*OtlpTracerProvider) Tracer

func (p *OtlpTracerProvider) Tracer(name string) trace.Tracer

type ShutdownTracerProvider

type ShutdownTracerProvider interface {
	Tracer(name string) trace.Tracer
	Shutdown(ctx context.Context) error
}

func NewTraceProvider

func NewTraceProvider(config *Config) (ShutdownTracerProvider, error)

NewTraceProvider returns an OpenTelemetry ShutdownTracerProvider configured to use the Jaeger exporter that will send spans to the provided url. The returned ShutdownTracerProvider will also use a Resource configured with all the information about the application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL