export

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0, BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Labels

func Labels(output event.Exporter) event.Exporter

Labels builds an exporter that manipulates the context using the event. If the event is type IsTag or IsStartSpan then it returns a context updated with tag values from the event. For all other event types the event tags will be updated with values from the context if they are missing.

func LogWriter

func LogWriter(w io.Writer, onlyErrors bool) event.Exporter

LogWriter returns an Exporter that logs events to the supplied writer. If onlyErrors is true it does not log any event that did not have an associated error. It ignores all telemetry other than log events.

func Spans

func Spans(output event.Exporter) event.Exporter

Spans creates an exporter that maintains hierarchical span structure in the context. It creates new spans on EventStartSpan, adds events to the current span on EventLog or EventTag, and closes the span on EventEndSpan. The span structure can then be used by other exporters.

Types

type Span

type Span struct {
	Name     string
	ID       SpanContext
	ParentID SpanID
	// contains filtered or unexported fields
}

func GetSpan

func GetSpan(ctx context.Context) *Span

func (*Span) Events

func (s *Span) Events() []event.Event

func (*Span) Finish

func (s *Span) Finish() event.Event

func (*Span) Format

func (s *Span) Format(f fmt.State, r rune)

func (*Span) Start

func (s *Span) Start() event.Event

type SpanContext

type SpanContext struct {
	TraceID TraceID
	SpanID  SpanID
}

func (*SpanContext) Format

func (s *SpanContext) Format(f fmt.State, r rune)

type SpanID

type SpanID [8]byte

func (SpanID) IsValid

func (s SpanID) IsValid() bool

func (SpanID) String

func (s SpanID) String() string

type TraceID

type TraceID [16]byte

func (TraceID) String

func (t TraceID) String() string

Directories

Path Synopsis
Package metric aggregates events into metrics that can be exported.
Package metric aggregates events into metrics that can be exported.
Package ocagent adds the ability to export all telemetry to an ocagent.
Package ocagent adds the ability to export all telemetry to an ocagent.

Jump to

Keyboard shortcuts

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