tracer

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPacketSize = int(65000 * candihelper.Byte)

MaxPacketSize max packet size of UDP

Variables

This section is empty.

Functions

func GetTraceID

func GetTraceID(ctx context.Context) string

GetTraceID func

func GetTraceURL

func GetTraceURL(ctx context.Context) (u string)

GetTraceURL log trace url

func InitOpenTracing

func InitOpenTracing() error

InitOpenTracing with agent and service name

func Log

func Log(ctx context.Context, key string, value interface{})

Log trace

func LogEvent added in v1.3.6

func LogEvent(ctx context.Context, event string, payload ...interface{})

LogEvent trace

func SetError

func SetError(ctx context.Context, err error)

SetError func

func StartTrace

func StartTrace(ctx context.Context, operationName string) interfaces.Tracer

StartTrace starting trace child span from parent span

func WithTraceFunc

func WithTraceFunc(ctx context.Context, operationName string, fn func(context.Context, map[string]interface{}))

WithTraceFunc functional with context and tags in function params

func WithTraceFuncTracer

func WithTraceFuncTracer(ctx context.Context, operationName string, fn func(t interfaces.Tracer))

WithTraceFuncTracer functional with Tracer instance in function params

Types

type GRPCMetadataReaderWriter

type GRPCMetadataReaderWriter metadata.MD

GRPCMetadataReaderWriter grpc metadata

func (GRPCMetadataReaderWriter) ForeachKey

func (mrw GRPCMetadataReaderWriter) ForeachKey(handler func(string, string) error) error

ForeachKey method

func (GRPCMetadataReaderWriter) Set

func (mrw GRPCMetadataReaderWriter) Set(key, value string)

Set method

Jump to

Keyboard shortcuts

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