otlpexporter

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0 Imports: 21 Imported by: 47

README

OTLP Exporter

Exports traces and/or metrics via gRPC using OpenTelemetry format.

The following settings are required:

The following settings can be optionally configured:

  • cert_pem_file: certificate file for TLS credentials of gRPC client. Should only be used if insecure is set to false.
  • compression: compression key for supported compression types within collector. Currently the only supported mode is gzip.
  • headers: the headers associated with gRPC requests.
  • insecure (default = false): whether to enable client transport security for the exporter's gRPC connection. See grpc.WithInsecure().
  • keepalive: keepalive parameters for client gRPC. See grpc.WithKeepaliveParams().
  • reconnection_delay: time period between each reconnection performed by the exporter.
  • insecure: whether to enable client transport security for the exporter's gRPC connection. See grpc.WithInsecure().

Example:

exporters:
  otlp:
    endpoint: otelcol2:55680
    reconnection_delay: 60s
    insecure: true

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogExporter

NewLogExporter creates an OTLP log exporter.

func NewMetricsExporter

NewMetricsExporter creates an OTLP metrics exporter.

func NewTraceExporter

NewTraceExporter creates an OTLP trace exporter.

Types

type Config

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

	configgrpc.GRPCClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
}

Config defines configuration for OpenCensus exporter.

type Factory

type Factory struct {
}

Factory is the factory for OpenCensus exporter.

func (*Factory) CreateDefaultConfig

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

CreateDefaultConfig creates the default configuration for exporter.

func (*Factory) CreateLogExporter

CreateLogExporter creates a log exporter based on this config.

func (*Factory) CreateMetricsExporter

func (f *Factory) CreateMetricsExporter(
	ctx context.Context,
	params component.ExporterCreateParams,
	cfg configmodels.Exporter,
) (component.MetricsExporter, error)

CreateMetricsExporter creates a metrics exporter based on this config.

func (*Factory) CreateTraceExporter

func (f *Factory) CreateTraceExporter(
	ctx context.Context,
	params component.ExporterCreateParams,
	cfg configmodels.Exporter,
) (component.TraceExporter, 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