zipkin-go: Index | Files | Directories

package reporter

import ""

Package reporter holds the Reporter interface which is used by the Zipkin Tracer to send finished spans.

Subpackages of package reporter contain officially supported standard reporter implementations.


Package Files

reporter.go serializer.go

type JSONSerializer Uses

type JSONSerializer struct{}

JSONSerializer implements the default JSON encoding SpanSerializer.

func (JSONSerializer) ContentType Uses

func (JSONSerializer) ContentType() string

ContentType returns the ContentType needed for this encoding.

func (JSONSerializer) Serialize Uses

func (JSONSerializer) Serialize(spans []*model.SpanModel) ([]byte, error)

Serialize takes an array of Zipkin SpanModel objects and returns a JSON encoding of it.

type Reporter Uses

type Reporter interface {
    Send(model.SpanModel) // Send Span data to the reporter
    Close() error         // Close the reporter

Reporter interface can be used to provide the Zipkin Tracer with custom implementations to publish Zipkin Span data.

func NewNoopReporter Uses

func NewNoopReporter() Reporter

NewNoopReporter returns a no-op Reporter implementation.

type SpanSerializer Uses

type SpanSerializer interface {
    Serialize([]*model.SpanModel) ([]byte, error)
    ContentType() string

SpanSerializer describes the methods needed for allowing to set Span encoding type for the various Zipkin transports.


amqpPackage amqp implements a RabbitMq reporter to send spans to a Rabbit server/cluster.
httpPackage http implements a HTTP reporter to send spans to Zipkin V2 collectors.
kafkaPackage kafka implements a Kafka reporter to send spans to a Kafka server/cluster.
logPackage log implements a reporter to send spans in V2 JSON format to the Go standard Logger.
recorderPackage recorder implements a reporter to record spans in v2 format.

Package reporter imports 2 packages (graph) and is imported by 36 packages. Updated 2020-01-21. Refresh now. Tools for package owners.