otel: go.opentelemetry.io/otel/exporter/trace/stdout Index | Files

package stdout

import "go.opentelemetry.io/otel/exporter/trace/stdout"

Package stdout contains an OpenTelemetry tracing exporter for writing to stdout.


Package Files

doc.go stdout.go

type Exporter Uses

type Exporter struct {
    // contains filtered or unexported fields

Exporter is an implementation of trace.Exporter that writes spans to stdout.

func NewExporter Uses

func NewExporter(o Options) (*Exporter, error)

func (*Exporter) ExportSpan Uses

func (e *Exporter) ExportSpan(ctx context.Context, data *export.SpanData)

ExportSpan writes a SpanData in json format to stdout.

type Options Uses

type Options struct {
    // Writer is the destination.  If not set, os.Stdout is used.
    Writer io.Writer

    // PrettyPrint will pretty the json representation of the span,
    // making it print "pretty". Default is false.
    PrettyPrint bool

Options are the options to be used when initializing a stdout export.

Package stdout imports 5 packages (graph) and is imported by 4 packages. Updated 2020-01-14. Refresh now. Tools for package owners.