handler

package
v0.0.0-...-2a2fe1c Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

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

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

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

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