tracing

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: MIT Imports: 7 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Service string

Functions

func ClientIP

func ClientIP(req *http.Request) (clientIP string)

func Key

func Key() interface{}

func Setup

func Setup(f TraceFunc)

func With

func With(ctx context.Context, req *http.Request, f NewFunc) context.Context

func WithTrace

func WithTrace(ctx context.Context, event *zerolog.Event) *zerolog.Event

Types

type NewFunc

type NewFunc func(ctx context.Context, req *http.Request) Tracing

type TraceFunc

type TraceFunc func(ctx context.Context, event *zerolog.Event) *zerolog.Event

type Tracing

type Tracing interface {
	WithTrace(ctx context.Context, event *zerolog.Event) *zerolog.Event
	Dump(ctx context.Context, log *zerolog.Event) *zerolog.Event
}

Jump to

Keyboard shortcuts

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