tracer

package
v0.0.0-...-e4fe77d Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithTracer

func WithTracer(ctx context.Context, trace *Tracer, name string) context.Context

Types

type Span

type Span struct {
	Id       string    `json:"id,omitempty"`
	Name     string    `json:"name,omitempty"`
	CreateAt time.Time `json:"createAt,omitempty"`
	Parent   *Span     `json:"parent,omitempty"`
}

func NewRootSpan

func NewRootSpan(name string) *Span

func NewSpan

func NewSpan(parent *Span, name string) *Span

func (*Span) SpanID

func (s *Span) SpanID() string

type Tracer

type Tracer struct {
	Id       string    `json:"id"`
	Name     string    `json:"name"`
	CreateAt time.Time `json:"createAt"`

	Span *Span `json:"span"`
	// contains filtered or unexported fields
}

func ParseTrace

func ParseTrace(s string) *Tracer

func WithNewTracer

func WithNewTracer(ctx context.Context, name string) (context.Context, *Tracer)

func (*Tracer) SpanID

func (t *Tracer) SpanID() string

func (*Tracer) String

func (t *Tracer) String() string

func (*Tracer) TraceID

func (t *Tracer) TraceID() string

Jump to

Keyboard shortcuts

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