tracing

package
v1.6.22 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 7 Imported by: 137

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartSpan

func StartSpan(ctx context.Context, opName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

StartSpan starts child span in a context.

func StopSpan

func StopSpan(span trace.Span)

StopSpan ends the span specified

Types

type LogrusHook

type LogrusHook struct{}

LogrusHook is a logrus hook which adds logrus events to active spans. If the span is not recording or the span context is invalid, the hook is a no-op.

func NewLogrusHook

func NewLogrusHook() *LogrusHook

NewLogrusHook creates a new logrus hook

func (*LogrusHook) Fire

func (h *LogrusHook) Fire(entry *logrus.Entry) error

Fire is called when a log event occurs.

func (*LogrusHook) Levels

func (h *LogrusHook) Levels() []logrus.Level

Levels returns the logrus levels that this hook is interested in.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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