Documentation ¶
Index ¶
- func GetTraceID(ctx context.Context) string
- func GetTraceURL(ctx context.Context) (u string)
- func InitOpenTracing(serviceName string, opts ...OptionFunc) error
- func Log(ctx context.Context, key string, value interface{})
- func LogEvent(ctx context.Context, event string, payload ...interface{})
- func SetError(ctx context.Context, err error)
- func SkipTraceContext(ctx context.Context) context.Context
- func StartTrace(ctx context.Context, operationName string) interfaces.Tracer
- func StartTraceWithContext(ctx context.Context, operationName string) (interfaces.Tracer, context.Context)
- func WithTraceFunc(ctx context.Context, operationName string, ...)
- func WithTraceFuncTracer(ctx context.Context, operationName string, fn func(t interfaces.Tracer))
- type GRPCMetadataReaderWriter
- type Option
- type OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitOpenTracing ¶
func InitOpenTracing(serviceName string, opts ...OptionFunc) error
InitOpenTracing init jaeger tracing
func LogEvent ¶
LogEvent trace
func SkipTraceContext ¶ added in v1.5.13
SkipTraceContext inject to context for skip span tracer
func StartTrace ¶
func StartTrace(ctx context.Context, operationName string) interfaces.Tracer
StartTrace starting trace child span from parent span
func StartTraceWithContext ¶ added in v1.5.29
func StartTraceWithContext(ctx context.Context, operationName string) (interfaces.Tracer, context.Context)
StartTraceWithContext starting trace child span from parent span, returning tracer and context
Types ¶
type GRPCMetadataReaderWriter ¶
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
type Option ¶ added in v1.6.8
Option for init tracer option
type OptionFunc ¶ added in v1.6.8
type OptionFunc func(*Option)
OptionFunc func
func OptionSetAgentHost ¶ added in v1.6.8
func OptionSetAgentHost(agent string) OptionFunc
OptionSetAgentHost option func
func OptionSetBuildNumberTag ¶ added in v1.6.8
func OptionSetBuildNumberTag(number string) OptionFunc
OptionSetBuildNumberTag option func
func OptionSetLevel ¶ added in v1.6.8
func OptionSetLevel(level string) OptionFunc
OptionSetLevel option func
func OptionSetMaxGoroutineTag ¶ added in v1.6.8
func OptionSetMaxGoroutineTag(max int) OptionFunc
OptionSetMaxGoroutineTag option func
Click to show internal directories.
Click to hide internal directories.