otel: go.opentelemetry.io/otel/exporters/trace/jaeger Index | Files | Directories

package jaeger

import "go.opentelemetry.io/otel/exporters/trace/jaeger"

Package jaeger contains an OpenTelemetry tracing exporter for Jaeger.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Package Files

agent.go doc.go env.go jaeger.go reconnecting_udp_client.go uploader.go

func CollectorEndpointFromEnv Uses

func CollectorEndpointFromEnv() string

CollectorEndpointFromEnv return environment variable value of JAEGER_ENDPOINT

func InstallNewPipeline Uses

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

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

func NewExportPipeline Uses

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

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

type AgentEndpointOption Uses

type AgentEndpointOption func(o *AgentEndpointOptions)

func WithAttemptReconnectingInterval Uses

func WithAttemptReconnectingInterval(interval time.Duration) AgentEndpointOption

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

func WithDisableAttemptReconnecting Uses

func WithDisableAttemptReconnecting() AgentEndpointOption

WithDisableAttemptReconnecting sets option to disable reconnecting udp client.

func WithLogger Uses

func WithLogger(logger *log.Logger) AgentEndpointOption

WithLogger sets a logger to be used by agent client.

type AgentEndpointOptions Uses

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

type CollectorEndpointOption Uses

type CollectorEndpointOption func(o *CollectorEndpointOptions)

func WithCollectorEndpointOptionFromEnv Uses

func WithCollectorEndpointOptionFromEnv() CollectorEndpointOption

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

func WithHTTPClient Uses

func WithHTTPClient(client *http.Client) CollectorEndpointOption

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

func WithPassword Uses

func WithPassword(password string) CollectorEndpointOption

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

func WithUsername Uses

func WithUsername(username string) CollectorEndpointOption

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

type CollectorEndpointOptions Uses

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

type EndpointOption Uses

type EndpointOption func() (batchUploader, error)

func WithAgentEndpoint Uses

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 Uses

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 Uses

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

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

func NewRawExporter Uses

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 Uses

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

ExportSpans exports SpanData to Jaeger.

func (*Exporter) Flush Uses

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 Uses

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

Shutdown stops the exporter flushing any pending exports.

type Option Uses

type Option func(*options)

func WithBatchMaxCount Uses

func WithBatchMaxCount(batchMaxCount int) Option

WithBatchMaxCount defines the maximum number of spans in one batch

func WithBufferMaxCount Uses

func WithBufferMaxCount(bufferMaxCount int) Option

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

func WithDisabled Uses

func WithDisabled(disabled bool) Option

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

func WithDisabledFromEnv Uses

func WithDisabledFromEnv() Option

WithDisabledFromEnv uses environment variables and overrides disabled field.

func WithProcess Uses

func WithProcess(process Process) Option

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

func WithProcessFromEnv Uses

func WithProcessFromEnv() Option

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

func WithSDK Uses

func WithSDK(config *sdktrace.Config) Option

WithSDK sets the SDK config for the exporter pipeline.

type Process Uses

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

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

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

func ProcessFromEnv Uses

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.

Directories

PathSynopsis
internal/gen-go/jaeger
internal/gen-go/jaeger/collector-remote

Package jaeger imports 25 packages (graph) and is imported by 9 packages. Updated 2020-10-18. Refresh now. Tools for package owners.