exporter

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

README

Exporters

Below is the list of exporters directly supported by the OpenTelemetry Collector.

The contributors repository has more exporters that can be added to custom builds of the service.

Proxy Support

Beyond standard YAML configuration as outlined in the sections that follow, exporters that leverage the net/http package (all do today) also respect the following proxy environment variables:

  • HTTP_PROXY
  • HTTPS_PROXY
  • NO_PROXY

If set at Collector start time then exporters, regardless of protocol, will or will not proxy traffic as defined by these environment variables.

Data Ownership

When multiple exporters are configured to send the same data (e.g. by configuring multiple exporters for the same pipeline) the exporters will have a shared access to the data. Exporters get access to this shared data when ConsumeTraceData/ConsumeMetricsData function is called. Exporters MUST NOT modify the TraceData/MetricsData argument of these functions. If the exporter needs to modify the data while performing the exporting the exporter can clone the data and perform the modification on the clone or use a copy-on-write approach for individual sub-parts of TraceData/MetricsData argument. Any approach that does not mutate the original TraceData/MetricsData argument (including referenced data, such as Node, Resource, Spans, etc) is allowed.

Jaeger

Exports trace data to Jaeger collectors accepting one of the following protocols:

Configuration

Each different supported protocol has its own configuration settings.

gRPC
  • endpoint: target to which the exporter is going to send Jaeger trace data, using the gRPC protocol. The valid syntax is described at https://github.com/grpc/grpc/blob/master/doc/naming.md

  • secure: whether to enable client transport security for the exporter's gRPC connection. See grpc.WithInsecure(). Optional.

  • server_name_override: If set to a non empty string, it will override the virtual host name of authority (e.g. :authority header field) in requests (typically used for testing).

  • cert_pem_file: certificate file for TLS credentials of gRPC client. Should only be used if secure is set to true. Optional.

  • keepalive: keepalive parameters for client gRPC. See grpc.WithKeepaliveParams(). Optional.

Example:

exporters:
  jaeger_grpc:
    endpoint: jaeger-all-in-one:14250
    cert_pem_file: /my-cert.pem
    server_name_override: opentelemetry.io

Logging

Exports traces and/or metrics to the console via zap.Logger

Configuration
  • loglevel: the log level of the logging export (debug|info|warn|error). Default is info.

OpenCensus

Exports traces and/or metrics to another OTel-Svc endpoint via gRPC.

Configuration
  • endpoint: target to which the exporter is going to send traces or metrics, using the gRPC protocol. The valid syntax is described at https://github.com/grpc/grpc/blob/master/doc/naming.md. Required.

  • compression: compression key for supported compression types within collector. Currently the only supported mode is gzip. Optional.

  • headers: the headers associated with gRPC requests. Optional.

  • num_workers: number of workers that send the gRPC requests. Optional.

  • secure: whether to enable client transport security for the exporter's gRPC connection. See grpc.WithInsecure(). Optional.

  • cert_pem_file: certificate file for TLS credentials of gRPC client. Should only be used if secure is set to true. Optional.

  • reconnection_delay: time period between each reconnection performed by the exporter. Optional.

  • keepalive: keepalive parameters for client gRPC. See grpc.WithKeepaliveParams(). Optional.

Example:

exporters:
  opencensus:
    endpoint: localhost:14250
    reconnection_delay: 60s
    secure: false

Prometheus

TODO: document settings

Zipkin

Exports trace data to a Zipkin back-end.

Configuration

The following settings can be configured:

  • url: URL to which the exporter is going to send Zipkin trace data. This setting doesn't have a default value and must be specified in the configuration.

Example:

exporters:
  zipkin:
    url: "http://some.url:9411/api/v2/spans"

Documentation

Overview

Package exporter contains interfaces that wraps trace/metrics exporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(factories ...Factory) (map[string]Factory, error)

Build takes a list of exporter factories and returns a map of type map[string]Factory with factory type as keys. It returns a non-nil error when more than one factories have the same type.

Types

type Exporter added in v0.2.2

type Exporter interface {
	component.Component
}

Exporter defines functions that trace and metric exporters must implement.

type Factory

type Factory interface {
	// Type gets the type of the Exporter created by this factory.
	Type() string

	// CreateDefaultConfig creates the default configuration for the Exporter.
	// This method can be called multiple times depending on the pipeline
	// configuration and should not cause side-effects that prevent the creation
	// of multiple instances of the Exporter.
	// The object returned by this method needs to pass the checks implemented by
	// 'conifgcheck.ValidateConfig'. It is recommended to have such check in the
	// tests of any implementation of the Factory interface.
	CreateDefaultConfig() configmodels.Exporter

	// CreateTraceExporter creates a trace exporter based on this config.
	CreateTraceExporter(logger *zap.Logger, cfg configmodels.Exporter) (TraceExporter, error)

	// CreateMetricsExporter creates a metrics exporter based on this config.
	CreateMetricsExporter(logger *zap.Logger, cfg configmodels.Exporter) (MetricsExporter, error)
}

Factory interface for exporters.

type MetricsExporter

type MetricsExporter interface {
	consumer.MetricsConsumer
	Exporter
}

MetricsExporter composes MetricsConsumer with some additional exporter-specific functions.

type TraceExporter

type TraceExporter interface {
	consumer.TraceConsumer
	Exporter
}

TraceExporter composes TraceConsumer with some additional exporter-specific functions.

Directories

Path Synopsis
jaeger
jaegergrpcexporter
Package jaegergrpcexporter implements an exporter that sends trace data to a Jaeger collector gRPC endpoint.
Package jaegergrpcexporter implements an exporter that sends trace data to a Jaeger collector gRPC endpoint.
jaegerthrifthttpexporter
Package jaegerthrifthttpexporter implements an exporter that sends trace data to a Jaeger collector Thrift over HTTP endpoint.
Package jaegerthrifthttpexporter implements an exporter that sends trace data to a Jaeger collector Thrift over HTTP endpoint.

Jump to

Keyboard shortcuts

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