otlphttpexporter

package
v0.0.0-...-f06bd48 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Iterator

func Iterator(iter attribute.Iterator) []*commonpb.KeyValue

Iterator transforms an attribute iterator into OTLP key-values.

func KeyValue

func KeyValue(kv attribute.KeyValue) *commonpb.KeyValue

KeyValue transforms an attribute KeyValue into an OTLP key-value.

func KeyValues

func KeyValues(attrs []attribute.KeyValue) []*commonpb.KeyValue

KeyValues transforms a slice of attribute KeyValues into OTLP key-values.

func Resource

func Resource(r *resource.Resource) *resourcepb.Resource

Resource transforms a Resource into an OTLP Resource.

func ResourceAttributes

func ResourceAttributes(resource *resource.Resource) []*commonpb.KeyValue

ResourceAttributes transforms a Resource OTLP key-values.

func Spans

Spans transforms a slice of OpenTelemetry spans into a slice of OTLP ResourceSpans.

func Value

func Value(v attribute.Value) *commonpb.AnyValue

Value transforms an attribute Value into an OTLP AnyValue.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

func NewOtlpHttpExporter

func NewOtlpHttpExporter(endpoint string, headers map[string]string) (*Exporter, error)

func (*Exporter) ExportSpans

func (e *Exporter) ExportSpans(ctx context.Context, spans []tracesdk.ReadOnlySpan) error

func (*Exporter) Shutdown

func (e *Exporter) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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