jaegerthrifthttpexporter

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package jaegerthrifthttpexporter implements an exporter that sends trace data to a Jaeger collector Thrift over HTTP endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	config configmodels.Exporter,
	httpAddress string,
	headers map[string]string,
	timeout time.Duration,
) (exporter.TraceExporter, error)

New returns a new Jaeger Thrift over HTTP exporter. The exporterName is the name to be used in the observability of the exporter. The httpAddress should be the URL of the collector to handle POST requests, typically something like: http://hostname:14268/api/traces. The headers parameter is used to add entries to the POST message set to the collector. The timeout is used to set the timeout for the HTTP requests, if the value is equal or smaller than zero the default of 5 seconds is used.

Types

type Config

type Config struct {
	configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.

	// URL is the URL to send the Jaeger trace data to (e.g.:
	// http://some.url:14268/api/traces).
	URL string `mapstructure:"url"`

	// Timeout is the maximum timeout for HTTP request sending trace data. The
	// default value is 5 seconds.
	Timeout time.Duration `mapstructure:"timeout"`

	// Headers are a set of headers to be added to the HTTP request sending
	// trace data.
	Headers map[string]string `mapstructure:"headers"`
}

Config defines configuration for Jaeger Thrift over HTTP exporter.

type Factory

type Factory struct {
}

Factory is the factory for Jaeger Thrift over HTTP exporter.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() configmodels.Exporter

CreateDefaultConfig creates the default configuration for exporter.

func (*Factory) CreateMetricsExporter

func (f *Factory) CreateMetricsExporter(
	logger *zap.Logger,
	cfg configmodels.Exporter,
) (exporter.MetricsExporter, error)

CreateMetricsExporter creates a metrics exporter based on this config.

func (*Factory) CreateTraceExporter

func (f *Factory) CreateTraceExporter(
	logger *zap.Logger,
	config configmodels.Exporter,
) (exporter.TraceExporter, error)

CreateTraceExporter creates a trace exporter based on this config.

func (*Factory) Type

func (f *Factory) Type() string

Type gets the type of the Exporter config created by this factory.

Jump to

Keyboard shortcuts

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