Back to godoc.org
github.com/openzipkin/zipkin-go/reporter

package reporter

v0.2.2
Latest Go to latest
Published: Sep 15, 2019 | License: Apache-2.0 | Module: github.com/openzipkin/zipkin-go

Overview

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.

Index

type JSONSerializer

type JSONSerializer struct{}

JSONSerializer implements the default JSON encoding SpanSerializer.

func (JSONSerializer) ContentType

func (JSONSerializer) ContentType() string

ContentType returns the ContentType needed for this encoding.

func (JSONSerializer) Serialize

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

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

func NewNoopReporter() Reporter

NewNoopReporter returns a no-op Reporter implementation.

type SpanSerializer

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier