tracing

package
v0.0.0-...-358e048 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKafkaTracingHeadersFromSpanCtx

func GetKafkaTracingHeadersFromSpanCtx(spanCtx opentracing.SpanContext) []kafka.Header

func GetTextMapCarrierFromMetaData

func GetTextMapCarrierFromMetaData(ctx context.Context) opentracing.TextMapCarrier

func InjectTextMapCarrier

func InjectTextMapCarrier(spanCtx opentracing.SpanContext) (opentracing.TextMapCarrier, error)

func InjectTextMapCarrierToGrpcMetaData

func InjectTextMapCarrierToGrpcMetaData(ctx context.Context, spanCtx opentracing.SpanContext) context.Context

func NewJaegerTracer

func NewJaegerTracer(jaegerConfig *Config) (opentracing.Tracer, io.Closer, error)

func StartGrpcServerTracerSpan

func StartGrpcServerTracerSpan(ctx context.Context, operationName string) (context.Context, opentracing.Span)

func StartHttpServerTracerSpan

func StartHttpServerTracerSpan(c echo.Context, operationName string) (context.Context, opentracing.Span)

func StartKafkaConsumerTracerSpan

func StartKafkaConsumerTracerSpan(ctx context.Context, headers []kafka.Header, operationName string) (context.Context, opentracing.Span)

func TextMapCarrierFromKafkaMessageHeaders

func TextMapCarrierFromKafkaMessageHeaders(headers []kafka.Header) opentracing.TextMapCarrier

func TextMapCarrierToKafkaMessageHeaders

func TextMapCarrierToKafkaMessageHeaders(textMap opentracing.TextMapCarrier) []kafka.Header

Types

type Config

type Config struct {
	ServiceName string `mapstructure:"serviceName"`
	HostPort    string `mapstructure:"hostPort"`
	Enable      bool   `mapstructure:"enable"`
	LogSpans    bool   `mapstructure:"logSpans"`
}

Jump to

Keyboard shortcuts

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