tracing

package
v0.0.0-...-953ae9e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTracingToReq

func AddTracingToReq(req *http.Request, span opentracing.Span)

AddTracingToReq adds tracing information to an OUTGOING HTTP request

func AddTracingToReqFromContext

func AddTracingToReqFromContext(ctx context.Context, req *http.Request)

AddTracingToReqFromContext adds tracing information to an OUTGOING HTTP request

func AddTracingToTextMapCarrier

func AddTracingToTextMapCarrier(span opentracing.Span, val opentracing.TextMapCarrier) error

func CarrierToMap

func CarrierToMap(values map[string]string) map[string]interface{}

CarrierToMap converts a TextMapCarrier to the amqp headers format

func CloseSpan

func CloseSpan(span opentracing.Span, event string)

CloseSpan logs event finishes span.

func InitTracing

func InitTracing(zipkinURL string, serviceName string)

InitTracing connects the calling service to Zipkin and initializes the tracer.

func LogEventToOngoingSpan

func LogEventToOngoingSpan(ctx context.Context, logMessage string)

LogEventToOngoingSpan extracts span from context and adds LogEvent

func MapToCarrier

func MapToCarrier(headers map[string]interface{}) opentracing.HTTPHeadersCarrier

MapToCarrier converts a generic map to opentracing http headers carrier

func SetTracer

func SetTracer(initializedTracer opentracing.Tracer)

SetTracer can be used by unit tests to provide a NoopTracer instance. Real users should always use the InitTracing func.

func StartChildSpanFromContext

func StartChildSpanFromContext(ctx context.Context, opName string) opentracing.Span

StartChildSpanFromContext starts a child span from span within the supplied context, if available.

func StartHTTPTrace

func StartHTTPTrace(r *http.Request, opName string) opentracing.Span

StartHTTPTrace loads tracing information from an INCOMING HTTP request.

func StartSpanFromContext

func StartSpanFromContext(ctx context.Context, opName string) opentracing.Span

StartSpanFromContext starts a span.

func StartSpanFromContextWithLogEvent

func StartSpanFromContextWithLogEvent(ctx context.Context, opName string, logStatement string) opentracing.Span

StartSpanFromContextWithLogEvent starts span from context with logevent

func StartTraceFromCarrier

func StartTraceFromCarrier(carrier map[string]interface{}, spanName string) opentracing.Span

StartTraceFromCarrier extracts tracing info from a generic map and starts a new span.

func UpdateContext

func UpdateContext(ctx context.Context, span opentracing.Span) context.Context

UpdateContext updates the supplied context with the supplied span.

Types

This section is empty.

Jump to

Keyboard shortcuts

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