otel: go.opentelemetry.io/otel/sdk/export/trace Index | Files

package trace

import "go.opentelemetry.io/otel/sdk/export/trace"


Package Files


type Event Uses

type Event struct {
    // Name is the name of this event
    Name string

    // Attributes contains a list of keyvalue pairs.
    Attributes []core.KeyValue

    // Time is the time at which this event was recorded.
    Time time.Time

Event is used to describe an Event with a message string and set of Attributes.

type SpanBatcher Uses

type SpanBatcher interface {
    ExportSpans(context.Context, []*SpanData)

SpanBatcher is a type for functions that receive batched of sampled trace spans.

The ExportSpans method is called asynchronously. However its should not take forever to process the spans.

The SpanData should not be modified.

type SpanData Uses

type SpanData struct {
    SpanContext  core.SpanContext
    ParentSpanID core.SpanID
    SpanKind     apitrace.SpanKind
    Name         string
    StartTime    time.Time
    // The wall clock time of EndTime will be adjusted to always be offset
    // from StartTime by the duration of the span.
    EndTime                  time.Time
    Attributes               []core.KeyValue
    MessageEvents            []Event
    Links                    []apitrace.Link
    StatusCode               codes.Code
    StatusMessage            string
    HasRemoteParent          bool
    DroppedAttributeCount    int
    DroppedMessageEventCount int
    DroppedLinkCount         int

    // ChildSpanCount holds the number of child span created for this span.
    ChildSpanCount int

    // Resource contains attributes representing an entity that produced this span.
    Resource *resource.Resource

SpanData contains all the information collected by a span.

type SpanSyncer Uses

type SpanSyncer interface {
    ExportSpan(context.Context, *SpanData)

SpanSyncer is a type for functions that receive a single sampled trace span.

The ExportSpan method is called synchronously. Therefore, it should not take forever to process the span.

The SpanData should not be modified.

Package trace imports 6 packages (graph) and is imported by 13 packages. Updated 2020-03-26. Refresh now. Tools for package owners.