trace

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(c context.Context, operation string, spanOpts ...sentry.SpanOption) func()

Start starts a span and return a finish() function to finish the corresponding span.

Types

type TraceableContext

type TraceableContext struct {
	context.Context
	// contains filtered or unexported fields
}

TraceableContext contains a stack which holds the sentry span context information. Not thread safe.

func NewTraceableContext

func NewTraceableContext(ctx context.Context) *TraceableContext

NewTraceableContext return a traceable context which can hold different level of span information. This function Should be called in the upper layer only (handler, middleware...) and the lower layer reuse this context to create a hierarchy span tree.

func (*TraceableContext) Pop

func (c *TraceableContext) Pop() context.Context

func (*TraceableContext) Push

func (c *TraceableContext) Push(ctx context.Context)

Jump to

Keyboard shortcuts

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