Documentation ¶
Index ¶
- type Config
- type Factory
- func (f *Factory) CreateDefaultConfig() configmodels.Exporter
- func (f *Factory) CreateMetricsExporter(logger *zap.Logger, config configmodels.Exporter) (consumer.MetricsConsumer, exporter.StopFunc, error)
- func (f *Factory) CreateTraceExporter(logger *zap.Logger, config configmodels.Exporter) (consumer.TraceConsumer, exporter.StopFunc, error)
- func (f *Factory) OCAgentOptions(logger *zap.Logger, ocac *Config) ([]ocagent.ExporterOption, error)
- func (f *Factory) Type() string
- type KeepaliveConfig
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
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.
Click to show internal directories.
Click to hide internal directories.