zipkin

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package zipkin contains an exporter for Zipkin.

Example:

import (
	openzipkin "github.com/openzipkin/zipkin-go"
	"github.com/openzipkin/zipkin-go/reporter/http"
	"go.opencensus.io/trace/adaptor/zipkin"
)
...
	localEndpoint, err := openzipkin.NewEndpoint("server", "server:5454")
	if err != nil {
		log.Print(err)
	}
	reporter := http.NewReporter("http://localhost:9411/api/v2/spans")
	exporter := zipkin.NewExporter(reporter, localEndpoint)
	trace.RegisterExporter(exporter)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

Exporter is an implementation of trace.Exporter that uploads spans to a Zipkin server.

func NewExporter

func NewExporter(reporter reporter.Reporter, localEndpoint *model.Endpoint) *Exporter

NewExporter returns an implementation of trace.Exporter that uploads spans to a Zipkin server.

reporter is a Zipkin Reporter which will be used to send the spans. These can be created with the openzipkin library, using one of the packages under github.com/openzipkin/zipkin-go/reporter.

localEndpoint sets the local endpoint of exported spans. It can be constructed with github.com/openzipkin/zipkin-go.NewEndpoint, e.g.:

localEndpoint, err := NewEndpoint("my server", listener.Addr().String())

localEndpoint can be nil.

func (*Exporter) Export

func (e *Exporter) Export(s *trace.SpanData)

Export exports a span to a Zipkin server.

Jump to

Keyboard shortcuts

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