spanutils

package
v2.0.0-...-1c13370 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientSpan

func ClientSpan(operationName string, ctx context.Context) (context.Context, opentracing.Span)

ClientSpan starts a new client span linked to the existing spans if any are found

Types

type TracingSpan

type TracingSpan interface {
	End()
	Finish()
	SetTag(key string, value interface{})
	SetQuery(query string)
	SetError(msg string)
}

TracingSpan defines an interface for implementing a tracing span

func NewDatastoreSpan

func NewDatastoreSpan(ctx context.Context, name string, datastore string) (TracingSpan, context.Context)

NewDatastoreSpan starts a span for tracing data store actions

func NewExternalSpan

func NewExternalSpan(ctx context.Context, name string, url string) (TracingSpan, context.Context)

NewExternalSpan starts a span for tracing external actions

func NewHTTPExternalSpan

func NewHTTPExternalSpan(ctx context.Context, name string, url string, hdr http.Header) (TracingSpan, context.Context)

NewHTTPExternalSpan starts a span for tracing external HTTP actions

func NewInternalSpan

func NewInternalSpan(ctx context.Context, name string) (TracingSpan, context.Context)

NewInternalSpan starts a span for tracing internal actions

Jump to

Keyboard shortcuts

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