handler

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 42 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// UnableToReadBodyErrFormat is an error message for invalid requests
	UnableToReadBodyErrFormat = "Unable to process request body: %v"
)

Variables

This section is empty.

Functions

func StartOTLPReceiver added in v1.35.0

func StartOTLPReceiver(options *flags.CollectorOptions, logger *zap.Logger, spanProcessor processor.SpanProcessor, tm *tenancy.Manager) (receiver.Traces, error)

StartOTLPReceiver starts OpenTelemetry OTLP receiver listening on gRPC and HTTP ports.

func StartZipkinReceiver added in v1.53.0

func StartZipkinReceiver(
	options *flags.CollectorOptions,
	logger *zap.Logger,
	spanProcessor processor.SpanProcessor,
	tm *tenancy.Manager,
) (receiver.Traces, error)

StartZipkinReceiver starts Zipkin receiver from OTEL Collector.

Types

type APIHandler

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

APIHandler handles all HTTP calls to the collector

func NewAPIHandler

func NewAPIHandler(
	jaegerBatchesHandler JaegerBatchesHandler,
) *APIHandler

NewAPIHandler returns a new APIHandler

func (*APIHandler) RegisterRoutes

func (aH *APIHandler) RegisterRoutes(router *mux.Router)

RegisterRoutes registers routes for this handler on the given router

func (*APIHandler) SaveSpan

func (aH *APIHandler) SaveSpan(w http.ResponseWriter, r *http.Request)

SaveSpan submits the span provided in the request body to the JaegerBatchesHandler

type GRPCHandler

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

GRPCHandler implements gRPC CollectorService.

func NewGRPCHandler

func NewGRPCHandler(logger *zap.Logger, spanProcessor processor.SpanProcessor, tenancyMgr *tenancy.Manager) *GRPCHandler

NewGRPCHandler registers routes for this handler on the given router.

func (*GRPCHandler) PostSpans

PostSpans implements gRPC CollectorService.

type JaegerBatchesHandler

type JaegerBatchesHandler interface {
	// SubmitBatches records a batch of spans in Jaeger Thrift format
	SubmitBatches(batches []*jaeger.Batch, options SubmitBatchOptions) ([]*jaeger.BatchSubmitResponse, error)
}

JaegerBatchesHandler consumes and handles Jaeger batches

func NewJaegerSpanHandler

func NewJaegerSpanHandler(logger *zap.Logger, modelProcessor processor.SpanProcessor) JaegerBatchesHandler

NewJaegerSpanHandler returns a JaegerBatchesHandler

type SubmitBatchOptions

type SubmitBatchOptions struct {
	InboundTransport processor.InboundTransport
}

SubmitBatchOptions are passed to Submit methods of the handlers.

type ZipkinSpansHandler

type ZipkinSpansHandler interface {
	// SubmitZipkinBatch records a batch of spans in Zipkin Thrift format
	SubmitZipkinBatch(spans []*zipkincore.Span, options SubmitBatchOptions) ([]*zipkincore.Response, error)
}

ZipkinSpansHandler consumes and handles zipkin spans

func NewZipkinSpanHandler

func NewZipkinSpanHandler(logger *zap.Logger, modelHandler processor.SpanProcessor, sanitizer zipkinS.Sanitizer) ZipkinSpansHandler

NewZipkinSpanHandler returns a ZipkinSpansHandler

Jump to

Keyboard shortcuts

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