Documentation ¶
Index ¶
Constants ¶
const (
// UnableToReadBodyErrFormat is an error message for invalid requests
UnableToReadBodyErrFormat = "Unable to process request body: %v"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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) *GRPCHandler
NewGRPCHandler registers routes for this handler on the given router.
func (*GRPCHandler) PostSpans ¶
func (g *GRPCHandler) PostSpans(ctx context.Context, r *api_v2.PostSpansRequest) (*api_v2.PostSpansResponse, error)
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 TChannelHandler ¶
type TChannelHandler struct {
// contains filtered or unexported fields
}
TChannelHandler implements jaeger.TChanCollector and zipkincore.TChanZipkinCollector.
func NewTChannelHandler ¶
func NewTChannelHandler( jaegerHandler JaegerBatchesHandler, zipkinHandler ZipkinSpansHandler, ) *TChannelHandler
NewTChannelHandler creates new handler that implements both Jaeger and Zipkin endpoints.
func (*TChannelHandler) SubmitBatches ¶
func (h *TChannelHandler) SubmitBatches( _ thrift.Context, batches []*jaeger.Batch, ) ([]*jaeger.BatchSubmitResponse, error)
SubmitBatches implements jaeger.TChanCollector.
func (*TChannelHandler) SubmitZipkinBatch ¶
func (h *TChannelHandler) SubmitZipkinBatch( _ thrift.Context, spans []*zipkincore.Span, ) ([]*zipkincore.Response, error)
SubmitZipkinBatch implements zipkincore.TChanZipkinCollector.
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