jaeger

package module
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: Apache-2.0 Imports: 16 Imported by: 1

README

OpenTelemetry-Go Jaeger Exporter

OpenTelemetry Jaeger exporter

Installation

go get -u go.opentelemetry.io/otel/exporter/trace/jaeger

Documentation

Overview

Package jaeger contains an OpenTelemetry tracing exporter for Jaeger.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAgentEndpoint

func WithAgentEndpoint(agentEndpoint string) func() (batchUploader, error)

WithAgentEndpoint instructs exporter to send spans to jaeger-agent at this address. For example, localhost:6831.

func WithBufferMaxCount

func WithBufferMaxCount(bufferMaxCount int) func(o *options)

WithBufferMaxCount defines the total number of traces that can be buffered in memory

func WithCollectorEndpoint

func WithCollectorEndpoint(collectorEndpoint string, options ...CollectorEndpointOption) func() (batchUploader, error)

WithCollectorEndpoint defines the full url to the Jaeger HTTP Thrift collector. For example, http://localhost:14268/api/traces

func WithOnError

func WithOnError(onError func(err error)) func(o *options)

WithOnError sets the hook to be called when there is an error occurred when uploading the span data. If no custom hook is set, errors are logged.

func WithPassword

func WithPassword(password string) func(o *CollectorEndpointOptions)

WithPassword sets the password to be used if basic auth is required.

func WithProcess

func WithProcess(process Process) func(o *options)

WithProcess sets the process with the information about the exporting process.

func WithUsername

func WithUsername(username string) func(o *CollectorEndpointOptions)

WithUsername sets the username to be used if basic auth is required.

Types

type CollectorEndpointOption

type CollectorEndpointOption func(o *CollectorEndpointOptions)

type CollectorEndpointOptions

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

type EndpointOption

type EndpointOption func() (batchUploader, error)

type Exporter

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

Exporter is an implementation of trace.Exporter that uploads spans to Jaeger.

func NewExporter

func NewExporter(endpointOption EndpointOption, opts ...Option) (*Exporter, error)

NewExporter returns a trace.Exporter implementation that exports the collected spans to Jaeger.

func (*Exporter) ExportSpan

func (e *Exporter) ExportSpan(ctx context.Context, d *export.SpanData)

ExportSpan exports a SpanData to Jaeger.

func (*Exporter) Flush

func (e *Exporter) Flush()

Flush waits for exported trace spans to be uploaded.

This is useful if your program is ending and you do not want to lose recent spans.

type Option

type Option func(*options)

type Process

type Process struct {
	// ServiceName is the Jaeger service name.
	ServiceName string

	// Tags are added to Jaeger Process exports
	Tags []core.KeyValue
}

Process contains the information exported to jaeger about the source of the trace data.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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