package tracing

import "github.com/containerd/containerd/tracing"

Index

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.

Source Files

log.go tracing.go

Directories

PathSynopsis
tracing/plugin
Version
v1.6.13
Published
Dec 15, 2022
Platform
js/wasm
Imports
7 packages
Last checked
1 hour ago

Tools for package owners.