zipkin

package module
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: Apache-2.0 Imports: 18 Imported by: 14

Documentation

Overview

Package zipkin contains an OpenTelemetry tracing exporter for Zipkin.

This package is currently in a pre-GA phase. Backwards incompatible changes may be introduced in subsequent minor version releases as we work to track the evolving OpenTelemetry specification and user feedback.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallNewPipeline added in v0.10.0

func InstallNewPipeline(collectorURL, serviceName string, opts ...Option) error

InstallNewPipeline instantiates a NewExportPipeline with the recommended configuration and registers it globally.

func NewExportPipeline added in v0.10.0

func NewExportPipeline(collectorURL, serviceName string, opts ...Option) (*sdktrace.TracerProvider, error)

NewExportPipeline sets up a complete export pipeline with the recommended setup for trace provider

Types

type Exporter

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

Exporter exports SpanSnapshots to the zipkin collector. It implements the SpanBatcher interface, so it needs to be used together with the WithBatcher option when setting up the exporter pipeline.

func NewRawExporter added in v0.10.0

func NewRawExporter(collectorURL, serviceName string, opts ...Option) (*Exporter, error)

NewRawExporter creates a new Zipkin exporter.

func (*Exporter) ExportSpans

func (e *Exporter) ExportSpans(ctx context.Context, ss []*export.SpanSnapshot) error

ExportSpans exports SpanSnapshots to a Zipkin receiver.

func (*Exporter) Shutdown added in v0.12.0

func (e *Exporter) Shutdown(ctx context.Context) error

Shutdown stops the exporter flushing any pending exports.

type Option

type Option func(*options)

Option defines a function that configures the exporter.

func WithClient

func WithClient(client *http.Client) Option

WithClient configures the exporter to use the passed HTTP client.

func WithLogger

func WithLogger(logger *log.Logger) Option

WithLogger configures the exporter to use the passed logger.

func WithSDK added in v0.10.0

func WithSDK(config *sdktrace.Config) Option

WithSDK sets the SDK config for the exporter pipeline.

Jump to

Keyboard shortcuts

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