tracing

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tracing holds the opentracing span helpers used by the SDK.

They were previously imported from go-restful-plugins/v3/pkg/jaeger, which also pulled in its Jaeger client and HTTP framework dependencies. The behaviour is unchanged: spans are created through opentracing's global tracer, so they are recorded only if the application registers one.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLog

func AddLog(span opentracing.Span, key string, value string)

AddLog adds a key/value log field to span if it is not nil.

func AddTag

func AddTag(span opentracing.Span, key string, value string)

AddTag sets a tag on span if it is not nil.

func Finish

func Finish(span opentracing.Span)

Finish finishes span if it is not nil.

func InjectSpanIntoRequest

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

InjectSpanIntoRequest writes the span context into the request headers.

func StartChildSpan

func StartChildSpan(span opentracing.Span, name string) opentracing.Span

StartChildSpan starts a span as a child of span. It returns nil when span is nil.

func StartSpanFromContext

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

StartSpanFromContext starts a span as a child of the span in ctx. It returns a nil span when ctx is nil.

func TraceError

func TraceError(span opentracing.Span, err error)

TraceError records err on span as an error log field and sets the standard boolean error tag.

Types

This section is empty.

Jump to

Keyboard shortcuts

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