README

OpenTelemetry-Go Jaeger Exporter

OpenTelemetry Jaeger exporter

Installation

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

Maintenance

This exporter uses a vendored copy of the Apache Thrift library (v0.13.0) at a custom import path. When re-generating Thrift code in future, please adapt import paths as necessary.

Expand ▾ Collapse ▴

Documentation

Overview

    Package jaeger contains an OpenTelemetry tracing exporter for Jaeger.

    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 CollectorEndpointFromEnv

    func CollectorEndpointFromEnv() string

      CollectorEndpointFromEnv return environment variable value of JAEGER_ENDPOINT

      func InstallNewPipeline

      func InstallNewPipeline(endpointOption EndpointOption, opts ...Option) (func(), error)

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

        func NewExportPipeline

        func NewExportPipeline(endpointOption EndpointOption, opts ...Option) (trace.TracerProvider, func(), error)

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

          Types

          type AgentEndpointOption

          type AgentEndpointOption func(o *AgentEndpointOptions)

          func WithAttemptReconnectingInterval

          func WithAttemptReconnectingInterval(interval time.Duration) AgentEndpointOption

            WithAttemptReconnectingInterval sets the interval between attempts to re resolve agent endpoint.

            func WithDisableAttemptReconnecting

            func WithDisableAttemptReconnecting() AgentEndpointOption

              WithDisableAttemptReconnecting sets option to disable reconnecting udp client.

              func WithLogger

              func WithLogger(logger *log.Logger) AgentEndpointOption

                WithLogger sets a logger to be used by agent client.

                type AgentEndpointOptions

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

                type CollectorEndpointOption

                type CollectorEndpointOption func(o *CollectorEndpointOptions)

                func WithCollectorEndpointOptionFromEnv

                func WithCollectorEndpointOptionFromEnv() CollectorEndpointOption

                  WithCollectorEndpointOptionFromEnv uses environment variables to set the username and password if basic auth is required.

                  func WithHTTPClient

                  func WithHTTPClient(client *http.Client) CollectorEndpointOption

                    WithHTTPClient sets the http client to be used to make request to the collector endpoint.

                    func WithPassword

                    func WithPassword(password string) CollectorEndpointOption

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

                      func WithUsername

                      func WithUsername(username string) CollectorEndpointOption

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

                        type CollectorEndpointOptions

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

                        type EndpointOption

                        type EndpointOption func() (batchUploader, error)

                        func WithAgentEndpoint

                        func WithAgentEndpoint(agentEndpoint string, options ...AgentEndpointOption) EndpointOption

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

                          func WithCollectorEndpoint

                          func WithCollectorEndpoint(collectorEndpoint string, options ...CollectorEndpointOption) EndpointOption

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

                            type Exporter

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

                              Exporter is an implementation of an OTel SpanSyncer that uploads spans to Jaeger.

                              func NewRawExporter

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

                                NewRawExporter returns an OTel Exporter implementation that exports the collected spans to Jaeger.

                                It will IGNORE Disabled option.

                                func (*Exporter) ExportSpans

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

                                  ExportSpans exports SpanSnapshots 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.

                                    func (*Exporter) Shutdown

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

                                      Shutdown stops the exporter flushing any pending exports.

                                      type Option

                                      type Option func(*options)

                                      func WithBatchMaxCount

                                      func WithBatchMaxCount(batchMaxCount int) Option

                                        WithBatchMaxCount defines the maximum number of spans in one batch

                                        func WithBufferMaxCount

                                        func WithBufferMaxCount(bufferMaxCount int) Option

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

                                          func WithDisabled

                                          func WithDisabled(disabled bool) Option

                                            WithDisabled option will cause pipeline methods to use a no-op provider

                                            func WithDisabledFromEnv

                                            func WithDisabledFromEnv() Option

                                              WithDisabledFromEnv uses environment variables and overrides disabled field.

                                              func WithProcess

                                              func WithProcess(process Process) Option

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

                                                func WithProcessFromEnv

                                                func WithProcessFromEnv() Option

                                                  WithProcessFromEnv uses environment variables and overrides jaeger exporter's Process.

                                                  func WithSDK

                                                  func WithSDK(config *sdktrace.Config) Option

                                                    WithSDK sets the SDK config for the exporter pipeline.

                                                    type Process

                                                    type Process struct {
                                                    	// ServiceName is the Jaeger service name.
                                                    	ServiceName string
                                                    
                                                    	// Tags are added to Jaeger Process exports
                                                    	Tags []attribute.KeyValue
                                                    }

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

                                                      func ProcessFromEnv

                                                      func ProcessFromEnv() Process

                                                        ProcessFromEnv parse environment variables into jaeger exporter's Process. It will return a nil tag slice if the environment variable JAEGER_TAGS is malformed.

                                                        GOOS=linux, GOARCH=amd64

                                                        Directories

                                                        Path Synopsis
                                                        internal