pilosa: github.com/pilosa/pilosa/tracing Index | Files | Directories

package tracing

import "github.com/pilosa/pilosa/tracing"

Index

Package Files

tracing.go

type Span Uses

type Span interface {
    // Sets the end timestamp and finalizes Span state.
    Finish()

    // Adds key/value pairs to the span.
    LogKV(alternatingKeyValues ...interface{})
}

Span represents a single span in a distributed trace.

func StartSpanFromContext Uses

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

StartSpanFromContext returnus a new child span and context from a given context using the global tracer.

type Tracer Uses

type Tracer interface {
    // Returns a new child span and context from a given context.
    StartSpanFromContext(ctx context.Context, operationName string) (Span, context.Context)

    // Adds the required HTTP headers to pass context between nodes.
    InjectHTTPHeaders(r *http.Request)

    // Reads the HTTP headers to derive incoming context.
    ExtractHTTPHeaders(r *http.Request) (Span, context.Context)
}

Tracer implements a generic distributed tracing interface.

var GlobalTracer Tracer = NopTracer()

GlobalTracer is a single, global instance of Tracer.

func NopTracer Uses

func NopTracer() Tracer

NopTracer returns a tracer that doesn't do anything.

Directories

PathSynopsis
opentracing

Package tracing imports 2 packages (graph) and is imported by 8 packages. Updated 2019-10-10. Refresh now. Tools for package owners.