otel

package
v0.0.0-...-aab6500 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = New()
View Source
var TRACE_ID = "trace_id"

Functions

func End

func End()

func GetTraceId

func GetTraceId(ctx context.Context) string

func GinMiddleware

func GinMiddleware(service string) gin.HandlerFunc

func HttpInject

func HttpInject(ctx context.Context, request *http.Request)

func Start

func Start(c context.Context) (context.Context, string)

func String

func String(key string, value string) otel_zap_logger.Field

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New() *Logger

func (*Logger) Init

func (l *Logger) Init(g *gin.Engine) *Logger

初始时otel,包括Tempo服务器,以及在trace显示的信息。

func (*Logger) Start

func (l *Logger) Start(ctx context.Context) context.Context

Jump to

Keyboard shortcuts

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