jaegerthrifthttpexporter

package module
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 24 Imported by: 2

README

Jaeger Thrift Exporter

This exporter supports sending trace data to Jaeger over Thrift HTTP.

The following settings are required:

  • url (no default): target to which the exporter is going to send Jaeger trace data, using the Thrift HTTP protocol.

The following settings can be optionally configured:

  • timeout (default = 5s): the maximum time to wait for a HTTP request to complete
  • headers (no default): headers to be added to the HTTP request

Example:

exporters:
  jaeger_thrift:
    url: "http://some.other.location/api/traces"
    timeout: 2s
    headers:
      added-entry: "added value"
      dot.test: test

The full list of settings exposed for this exporter are documented here with detailed sample configurations here.

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,
) (component.TraceExporterOld, 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.

func OCProtoToJaegerThrift

func OCProtoToJaegerThrift(td consumerdata.TraceData) (*jaeger.Batch, error)

OCProtoToJaegerThrift translates OpenCensus trace data into the Jaeger Thrift format.

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,
) (component.MetricsExporterOld, error)

CreateMetricsExporter creates a metrics exporter based on this config.

func (*Factory) CreateTraceExporter

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

CreateTraceExporter creates a trace exporter based on this config.

func (*Factory) Type

func (f *Factory) Type() configmodels.Type

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