jaeger

package module
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 28 Imported by: 74

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.14.1) at a custom import path. When re-generating Thrift code in future, please adapt import paths as necessary.

Documentation

Overview

Deprecated: This package was moved to exporters/jaeger.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallNewPipeline added in v0.10.0

func InstallNewPipeline(endpointOption EndpointOption) (*sdktrace.TracerProvider, error)

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

func NewExportPipeline added in v0.3.0

func NewExportPipeline(endpointOption EndpointOption) (*sdktrace.TracerProvider, error)

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

Types

type AgentEndpointOption added in v0.12.0

type AgentEndpointOption func(o *AgentEndpointOptions)

func WithAgentHost added in v0.20.0

func WithAgentHost(host string) AgentEndpointOption

WithAgentHost sets a host to be used in the agent client endpoint. This option overrides any value set for the OTEL_EXPORTER_JAEGER_AGENT_HOST environment variable. If this option is not passed and the env var is not set, "localhost" will be used by default.

func WithAgentPort added in v0.20.0

func WithAgentPort(port string) AgentEndpointOption

WithAgentPort sets a port to be used in the agent client endpoint. This option overrides any value set for the OTEL_EXPORTER_JAEGER_AGENT_PORT environment variable. If this option is not passed and the env var is not set, "6832" will be used by default.

func WithAttemptReconnectingInterval added in v0.12.0

func WithAttemptReconnectingInterval(interval time.Duration) AgentEndpointOption

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

func WithDisableAttemptReconnecting added in v0.12.0

func WithDisableAttemptReconnecting() AgentEndpointOption

WithDisableAttemptReconnecting sets option to disable reconnecting udp client.

func WithLogger added in v0.12.0

func WithLogger(logger *log.Logger) AgentEndpointOption

WithLogger sets a logger to be used by agent client.

type AgentEndpointOptions added in v0.12.0

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

type CollectorEndpointOption

type CollectorEndpointOption func(o *CollectorEndpointOptions)

func WithEndpoint added in v0.20.0

func WithEndpoint(endpoint string) CollectorEndpointOption

WithEndpoint is the URL for the Jaeger collector that spans are sent to. This option overrides any value set for the OTEL_EXPORTER_JAEGER_ENDPOINT environment variable. If this option is not passed and the environment variable is not set, "http://localhost:14250" will be used by default.

func WithHTTPClient added in v0.5.0

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 in the authorization header sent for all requests to the collector. This option overrides any value set for the OTEL_EXPORTER_JAEGER_PASSWORD environment variable. If this option is not passed and the environment variable is not set, no password will be set.

func WithUsername

func WithUsername(username string) CollectorEndpointOption

WithUsername sets the username to be used in the authorization header sent for all requests to the collector. This option overrides any value set for the OTEL_EXPORTER_JAEGER_USER environment variable. If this option is not passed and the environment variable is not set, no username will be set.

type CollectorEndpointOptions

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

type EndpointOption

type EndpointOption func() (batchUploader, error)

func WithAgentEndpoint

func WithAgentEndpoint(options ...AgentEndpointOption) EndpointOption

WithAgentEndpoint configures the Jaeger exporter to send spans to a jaeger-agent. This will use the following environment variables for configuration if no explicit option is provided:

- OTEL_EXPORTER_JAEGER_AGENT_HOST is used for the agent address host - OTEL_EXPORTER_JAEGER_AGENT_PORT is used for the agent address port

The passed options will take precedence over any environment variables and default values will be used if neither are provided.

func WithCollectorEndpoint

func WithCollectorEndpoint(options ...CollectorEndpointOption) EndpointOption

WithCollectorEndpoint defines the full url to the Jaeger HTTP Thrift collector. This will use the following environment variables for configuration if no explicit option is provided:

- OTEL_EXPORTER_JAEGER_ENDPOINT is the HTTP endpoint for sending spans directly to a collector. - OTEL_EXPORTER_JAEGER_USER is the username to be sent as authentication to the collector endpoint. - OTEL_EXPORTER_JAEGER_PASSWORD is the password to be sent as authentication to the collector endpoint.

The passed options will take precedence over any environment variables. If neither values are provided for the endpoint, the default value of "http://localhost:14250" will be used. If neither values are provided for the username or the password, they will not be set since there is no default.

type Exporter

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

Exporter exports OpenTelemetry spans to a Jaeger agent or collector.

func NewRawExporter added in v0.3.0

func NewRawExporter(endpointOption EndpointOption) (*Exporter, error)

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

func (*Exporter) ExportSpans added in v0.12.0

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

ExportSpans transforms and exports OpenTelemetry spans to Jaeger.

func (*Exporter) Shutdown added in v0.12.0

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

Shutdown stops the Exporter. This will close all connections and release all resources held by the Exporter.

Jump to

Keyboard shortcuts

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