observability

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiddleware

func NewMiddleware(next http.Handler, name string, typeName string, spanKind trace.SpanKind) http.Handler

NewMiddleware returns a http.Handler struct.

func NewService

func NewService(ctx context.Context, service string, next http.Handler) http.Handler

NewService creates a new tracing middleware that traces the outgoing requests.

func Proto

func Proto(proto string) string

func SetStatusErrorf

func SetStatusErrorf(ctx context.Context, format string, args ...interface{})

SetStatusErrorf flags the span as in error and log an event.

func WrapEntryPointHandler

func WrapEntryPointHandler(ctx context.Context, tracer *tracing.Tracer, semConvMetricRegistry *metrics.SemConvMetricsRegistry, entryPointName string) alice.Constructor

WrapEntryPointHandler Wraps tracing to alice.Constructor.

func WrapMiddleware

func WrapMiddleware(ctx context.Context, constructor alice.Constructor) alice.Constructor

WrapMiddleware adds traceability to an alice.Constructor.

func WrapRouterHandler

func WrapRouterHandler(ctx context.Context, router, routerRule, service string) alice.Constructor

WrapRouterHandler Wraps tracing to alice.Constructor.

Types

type Traceable

type Traceable interface {
	GetTracingInformation() (name string, typeName string, spanKind trace.SpanKind)
}

Traceable embeds tracing information.

Jump to

Keyboard shortcuts

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