Documentation ¶
Overview ¶
Package jaegerthrifthttpexporter implements an exporter that sends trace data to a Jaeger collector Thrift over HTTP endpoint.
Index ¶
- func New(config configmodels.Exporter, httpAddress string, headers map[string]string, ...) (component.TraceExporterOld, error)
- func OCProtoToJaegerThrift(td consumerdata.TraceData) (*jaeger.Batch, error)
- type Config
- type Factory
- func (f *Factory) CreateDefaultConfig() configmodels.Exporter
- func (f *Factory) CreateMetricsExporter(logger *zap.Logger, cfg configmodels.Exporter) (component.MetricsExporterOld, error)
- func (f *Factory) CreateTraceExporter(logger *zap.Logger, config configmodels.Exporter) (component.TraceExporterOld, error)
- func (f *Factory) Type() configmodels.Type
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.