trace

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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