Documentation ¶
Index ¶
- func AddTracingToReq(req *http.Request, span opentracing.Span)
- func AddTracingToReqFromContext(ctx context.Context, req *http.Request)
- func AddTracingToTextMapCarrier(span opentracing.Span, val opentracing.TextMapCarrier) error
- func CarrierToMap(values map[string]string) map[string]interface{}
- func CloseSpan(span opentracing.Span, event string)
- func InitTracing(zipkinURL string, serviceName string)
- func LogEventToOngoingSpan(ctx context.Context, logMessage string)
- func MapToCarrier(headers map[string]interface{}) opentracing.HTTPHeadersCarrier
- func SetTracer(initializedTracer opentracing.Tracer)
- func StartChildSpanFromContext(ctx context.Context, opName string) opentracing.Span
- func StartHTTPTrace(r *http.Request, opName string) opentracing.Span
- func StartSpanFromContext(ctx context.Context, opName string) opentracing.Span
- func StartSpanFromContextWithLogEvent(ctx context.Context, opName string, logStatement string) opentracing.Span
- func StartTraceFromCarrier(carrier map[string]interface{}, spanName string) opentracing.Span
- func UpdateContext(ctx context.Context, span opentracing.Span) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTracingToReq ¶
AddTracingToReq adds tracing information to an OUTGOING HTTP request
func AddTracingToReqFromContext ¶
AddTracingToReqFromContext adds tracing information to an OUTGOING HTTP request
func AddTracingToTextMapCarrier ¶
func AddTracingToTextMapCarrier(span opentracing.Span, val opentracing.TextMapCarrier) error
func CarrierToMap ¶
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 ¶
InitTracing connects the calling service to Zipkin and initializes the tracer.
func LogEventToOngoingSpan ¶
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 ¶
StartChildSpanFromContext starts a child span from span within the supplied context, if available.
func StartHTTPTrace ¶
StartHTTPTrace loads tracing information from an INCOMING HTTP request.
func StartSpanFromContext ¶
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 ¶
StartTraceFromCarrier extracts tracing info from a generic map and starts a new span.
Types ¶
This section is empty.