processor

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBusy = errors.New("server busy")

ErrBusy signalizes that processor cannot process incoming data

Functions

This section is empty.

Types

type Batch added in v1.65.0

type Batch interface {
	// GetSpans delegates to the appropriate function based on the data model version.
	GetSpans(v1 func(spans []*model.Span), v2 func(traces ptrace.Traces))

	GetSpanFormat() SpanFormat
	GetInboundTransport() InboundTransport
	GetTenant() string
}

Batch is a batch of spans passed to the processor.

type Details added in v1.65.0

type Details struct {
	SpanFormat       SpanFormat
	InboundTransport InboundTransport
	Tenant           string
}

func (Details) GetInboundTransport added in v1.65.0

func (d Details) GetInboundTransport() InboundTransport

func (Details) GetSpanFormat added in v1.65.0

func (d Details) GetSpanFormat() SpanFormat

func (Details) GetTenant added in v1.65.0

func (d Details) GetTenant() string

type InboundTransport

type InboundTransport string

InboundTransport identifies the transport used to receive spans.

const (
	// GRPCTransport indicates spans received over gRPC.
	GRPCTransport InboundTransport = "grpc"
	// HTTPTransport indicates spans received over HTTP.
	HTTPTransport InboundTransport = "http"
	// UnknownTransport is the fallback/catch-all category.
	UnknownTransport InboundTransport = "unknown"
)

type SpanFormat

type SpanFormat string

SpanFormat identifies the data format in which the span was originally received.

const (
	// JaegerSpanFormat is for Jaeger Thrift spans.
	JaegerSpanFormat SpanFormat = "jaeger"
	// ZipkinSpanFormat is for Zipkin Thrift spans.
	ZipkinSpanFormat SpanFormat = "zipkin"
	// ProtoSpanFormat is for Jaeger protobuf Spans.
	ProtoSpanFormat SpanFormat = "proto"
	// OTLPSpanFormat is for OpenTelemetry OTLP format.
	OTLPSpanFormat SpanFormat = "otlp"
	// UnknownSpanFormat is the fallback/catch-all category.
	UnknownSpanFormat SpanFormat = "unknown"
)

type SpanProcessor

type SpanProcessor interface {
	// ProcessSpans processes spans and return with either a list of true/false success or an error
	ProcessSpans(spans Batch) ([]bool, error)
	io.Closer
}

SpanProcessor handles spans

type SpansV1 added in v1.65.0

type SpansV1 struct {
	Spans []*model.Span
	Details
}

Spans is a batch of spans passed to the processor.

func (SpansV1) GetSpans added in v1.65.0

func (s SpansV1) GetSpans(v1 func([]*model.Span), _ func(ptrace.Traces))

type SpansV2 added in v1.65.0

type SpansV2 struct {
	Traces ptrace.Traces
	Details
}

func (SpansV2) GetSpans added in v1.65.0

func (s SpansV2) GetSpans(_ func([]*model.Span), v2 func(ptrace.Traces))

Jump to

Keyboard shortcuts

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