noop

package
v0.0.0-...-7d43bac Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: MIT Imports: 3 Imported by: 3

Documentation

Overview

Package noop provides support for NOOP (No Operation) request tracing mechanisms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Span

type Span struct{}

Span represents tracing span based on NOOP request tracing.

func (*Span) Finish

func (s *Span) Finish()

Finish stops tracing span.

func (*Span) Log

func (s *Span) Log(event string)

Log logs tracing span event.

func (*Span) LogWithFields

func (s *Span) LogWithFields(event string, fields map[string]interface{})

LogWithFields logs tracing span with event name and fields.

func (*Span) SetTag

func (s *Span) SetTag(key string, value interface{})

SetTag sets tag on tracing span.

type Tracer

type Tracer struct{}

Tracer represents tracing mechanism based on NOOP request tracing.

func NewTracer

func NewTracer() *Tracer

NewTracer creates an instance of tracer based on NOOP request tracing.

func (*Tracer) ContextWithSpan

func (t *Tracer) ContextWithSpan(ctx context.Context, span trace.Span) context.Context

ContextWithSpan creates context with tracing span.

func (*Tracer) Dispose

func (t *Tracer) Dispose()

Dispose cleans up NOOP tracer instance.

func (*Tracer) ExtractSpan

func (t *Tracer) ExtractSpan(name string, format interface{}, carrier interface{}) (trace.Span, error)

ExtractSpan extracts tracing span in particular format from carrier.

func (*Tracer) InjectSpan

func (t *Tracer) InjectSpan(s trace.Span, format interface{}, carrier interface{}) error

InjectSpan injects tracing span in particular format into carrier.

func (*Tracer) SpanFromContext

func (t *Tracer) SpanFromContext(ctx context.Context) trace.Span

SpanFromContext creates tracing span from context.

func (*Tracer) StartSpan

func (t *Tracer) StartSpan(name string) trace.Span

StartSpan starts tracing span with name.

func (*Tracer) StartSpanFromContext

func (t *Tracer) StartSpanFromContext(ctx context.Context, name string) (trace.Span, context.Context)

StartSpanFromContext starts tracing span with name from context.

func (*Tracer) StartSpanWithParent

func (t *Tracer) StartSpanWithParent(name string, parent trace.Span) trace.Span

StartSpanWithParent starts tracing span with parent span and name.

Jump to

Keyboard shortcuts

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