spanlogger

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package spanlogger provides a set of utilities to assist in working with spans

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Span added in v1.2.0

type Span interface {
	Log(level, format string, v ...interface{})
	LogObject(k, v interface{})
	WithField(k, v interface{}) Span
	Finish()

	ToString() string
}

Span - unified interface for opentelemetry spans

func FromContext

func FromContext(ctx context.Context, operation, methodName string, fields []*log.Field) (context.Context, log.Logger, Span, func())

FromContext - creates a new spanLogger from context and operation

Jump to

Keyboard shortcuts

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