opencensusexporter

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

	// The 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.
	Endpoint string `mapstructure:"endpoint"`

	// The compression key for supported compression types within
	// collector. Currently the only supported mode is `gzip`.
	Compression string `mapstructure:"compression"`

	// The headers associated with gRPC requests.
	Headers map[string]string `mapstructure:"headers"`

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

	// certificate file for TLS credentials of gRPC client. Should
	// only be used if `secure` is set to true.
	CertPemFile string `mapstructure:"cert-pem-file"`

	// Whether to enable client transport security for the exporter's gRPC
	// connection. See [grpc.WithInsecure()](https://godoc.org/google.golang.org/grpc#WithInsecure).
	UseSecure bool `mapstructure:"secure,omitempty"`

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

	// The keepalive parameters for client gRPC. See grpc.WithKeepaliveParams
	// (https://godoc.org/google.golang.org/grpc#WithKeepaliveParams).
	KeepaliveParameters *KeepaliveConfig `mapstructure:"keepalive,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) (consumer.MetricsConsumer, exporter.StopFunc, error)

CreateMetricsExporter creates a metrics exporter based on this config.

func (*Factory) CreateTraceExporter

func (f *Factory) CreateTraceExporter(logger *zap.Logger, config configmodels.Exporter) (consumer.TraceConsumer, exporter.StopFunc, 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() string

Type gets the type of the Exporter config created by this factory.

type KeepaliveConfig

type KeepaliveConfig struct {
	Time                time.Duration `mapstructure:"time,omitempty"`
	Timeout             time.Duration `mapstructure:"timeout,omitempty"`
	PermitWithoutStream bool          `mapstructure:"permit-without-stream,omitempty"`
}

KeepaliveConfig exposes the keepalive.ClientParameters to be used by the exporter. Refer to the original data-structure for the meaning of each parameter.

Jump to

Keyboard shortcuts

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