tools: Index | Files | Directories

package export

import ""


Package Files

id.go log.go tag.go trace.go

func Labels Uses

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 Uses

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 Uses

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.

type Span Uses

type Span struct {
    Name     string
    ID       SpanContext
    ParentID SpanID
    Start    event.Event
    Finish   event.Event
    Events   []event.Event

func GetSpan Uses

func GetSpan(ctx context.Context) *Span

func (*Span) Format Uses

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

type SpanContext Uses

type SpanContext struct {
    TraceID TraceID
    SpanID  SpanID

func (*SpanContext) Format Uses

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

type SpanID Uses

type SpanID [8]byte

func (SpanID) IsValid Uses

func (s SpanID) IsValid() bool

func (SpanID) String Uses

func (s SpanID) String() string

type TraceID Uses

type TraceID [16]byte

func (TraceID) String Uses

func (t TraceID) String() string


metricPackage metric aggregates events into metrics that can be exported.
ocagentPackage ocagent adds the ability to export all telemetry to an ocagent.

Package export imports 9 packages (graph) and is imported by 17 packages. Updated 2020-03-29. Refresh now. Tools for package owners.