opencensusexporter

package
v0.8.0 Latest Latest
Warning

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

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

README

OpenCensus Exporter

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

The following settings are required:

The following settings can be optionally configured:

  • insecure (default = false): whether to enable client transport security for the exporter's gRPC connection. See grpc.WithInsecure().
  • ca_file path to the CA cert. For a client this verifies the server certificate. Should only be used if insecure is set to true.
  • cert_file path to the TLS cert to use for TLS required connections. Should only be used if insecure is set to true.
  • key_file path to the TLS key to use for TLS required connections. Should only be used if insecure is set to true.
  • compression (default = gzip): compression key for supported compression types within collector. Currently the only supported mode is gzip.
  • headers the headers associated with gRPC requests.
  • keepalive keepalive parameters for client gRPC. See grpc.WithKeepaliveParams().
  • num_workers (default = 2): number of workers that send the gRPC requests. Optional.
  • reconnection_delay (default = unset): time period between each reconnection performed by the exporter.
  • balancer_name(default = pick_first): Sets the balancer in grpclb_policy to discover the servers. See grpc loadbalancing example.

Example:

exporters:
  opencensus:
    endpoint: otelcol2:55678
    reconnection_delay: 60s

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 NewMetricsExporter

func NewMetricsExporter(logger *zap.Logger, config configmodels.Exporter, opts ...ocagent.ExporterOption) (component.MetricsExporterOld, error)

NewMetricsExporter creates an Open Census metrics exporter.

func NewTraceExporter

func NewTraceExporter(logger *zap.Logger, config configmodels.Exporter, opts ...ocagent.ExporterOption) (component.TraceExporterOld, error)

NewTraceExporter creates an Open Census 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.

	// The number of workers that send the gRPC requests.
	NumWorkers int `mapstructure:"num_workers"`

	// The time period between each reconnection performed by the exporter.
	ReconnectionDelay time.Duration `mapstructure:"reconnection_delay,omitempty"`
}

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) CreateMetricsExporter

func (f *Factory) CreateMetricsExporter(logger *zap.Logger, config 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) OCAgentOptions

func (f *Factory) OCAgentOptions(logger *zap.Logger, ocac *Config) ([]ocagent.ExporterOption, error)

OCAgentOptions takes the oc exporter Config and generates ocagent Options

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