zipkin

package
v2.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: MIT Imports: 4 Imported by: 0

README

Zipkin compatibility features

NewZipkinB3HTTPHeaderPropagator()

Adds support for injecting and extracting Zipkin B3 Propagation HTTP headers, for use with other Zipkin collectors.


// ...
import (
  "github.com/uber/jaeger-client-go/zipkin"
)

func main() {
	// ...
	zipkinPropagator := zipkin.NewZipkinB3HTTPHeaderPropagator()
	injector := jaeger.TracerOptions.Injector(opentracing.HTTPHeaders, zipkinPropagator)
	extractor := jaeger.TracerOptions.Extractor(opentracing.HTTPHeaders, zipkinPropagator)

	// create Jaeger tracer
	tracer, closer := jaeger.NewTracer(
		"myService",
		mySampler, // as usual
		myReporter // as usual
		injector,
		extractor,
	)
}

Documentation

Overview

Package zipkin comprises Zipkin functionality for Zipkin compatiblity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Propagator

type Propagator struct{}

Propagator is an Injector and Extractor

func NewZipkinB3HTTPHeaderPropagator

func NewZipkinB3HTTPHeaderPropagator() Propagator

NewZipkinB3HTTPHeaderPropagator creates a Propagator for extracting and injecting Zipkin HTTP B3 headers into SpanContexts.

func (Propagator) Extract

func (p Propagator) Extract(abstractCarrier interface{}) (jaeger.SpanContext, error)

Extract conforms to the Extractor interface for encoding Zipkin HTTP B3 headers

func (Propagator) Inject

func (p Propagator) Inject(
	sc jaeger.SpanContext,
	abstractCarrier interface{},
) error

Inject conforms to the Injector interface for decoding Zipkin HTTP B3 headers

Jump to

Keyboard shortcuts

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