zipkin

package module
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 26 Imported by: 319

README

Zipkin Exporter

PkgGoDev

Documentation

Overview

Package zipkin contains an OpenTelemetry tracing exporter for Zipkin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SpanModels

func SpanModels(batch []tracesdk.ReadOnlySpan) []zkmodel.SpanModel

SpanModels converts OpenTelemetry spans into Zipkin model spans. This is used for exporting to Zipkin compatible tracing services.

Types

type Exporter

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

Exporter exports spans to the zipkin collector.

func New

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

New creates a new Zipkin exporter.

func (*Exporter) ExportSpans

func (e *Exporter) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error

ExportSpans exports spans to a Zipkin receiver.

func (*Exporter) MarshalLog added in v1.5.0

func (e *Exporter) MarshalLog() interface{}

MarshalLog is the marshaling function used by the logging system to represent this Exporter.

func (*Exporter) Shutdown

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

Shutdown stops the exporter flushing any pending exports.

type Option

type Option interface {
	// contains filtered or unexported methods
}

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 WithHeaders added in v1.28.0

func WithHeaders(headers map[string]string) Option

WithHeaders configures the exporter to use the passed HTTP request headers.

func WithLogger

func WithLogger(logger *log.Logger) Option

WithLogger configures the exporter to use the passed logger. WithLogger and WithLogr will overwrite each other.

func WithLogr added in v1.12.0

func WithLogr(logger logr.Logger) Option

WithLogr configures the exporter to use the passed logr.Logger. WithLogr and WithLogger will overwrite each other.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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