pulsarexporter

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

README

Pulsar Exporter

Pulsar exporter exports metrics to Pulsar.

Documentation

Overview

Package pulsarexporter exports trace data to Pulsar.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(options ...FactoryOption) component.ExporterFactory

NewFactory creates pulsar exporter factory.

Types

type Authentication

type Authentication struct {
	TLS *configtls.TLSClientSetting `mapstructure:"tls"`
}

type Config

type Config struct {
	exporterhelper.QueueSettings   `mapstructure:"sending_queue"`
	Authentication                 Authentication `mapstructure:"auth"`
	config.ExporterSettings        `mapstructure:",squash"`
	Broker                         string   `mapstructure:"broker"`
	Topic                          string   `mapstructure:"topic"`
	Encoding                       string   `mapstructure:"encoding"`
	Producer                       Producer `mapstructure:"producer"`
	exporterhelper.RetrySettings   `mapstructure:"retry_on_failure"`
	exporterhelper.TimeoutSettings `mapstructure:",squash"`
	OperationTimeout               time.Duration `mapstructure:"operation_timeout"`
	ConnectionTimeout              time.Duration `mapstructure:"connection_timeout"`
}

Config defines configuration for pulsar exporter.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the exporter configuration is valid

type FactoryOption

type FactoryOption func(factory *pulsarExporterFactory)

FactoryOption applies changes to pulsarExporterFactory.

type MetricsMarshaler

type MetricsMarshaler interface {
	// Marshal serializes metrics into pulsar's ProducerMessage
	Marshal(metrics pmetric.Metrics) ([]*pulsar.ProducerMessage, error)

	// Encoding returns encoding name
	Encoding() string
}

MetricsMarshaler marshals metrics into Message array

type Producer

type Producer struct {
	Properties                      map[string]string `mapstructure:"producer_properties"`
	MaxReconnectToBroker            *uint             `mapstructure:"max_reconnect_broker"`
	HashingScheme                   string            `mapstructure:"hashing_scheme"`
	CompressionLevel                string            `mapstructure:"compression_level"`
	CompressionType                 string            `mapstructure:"compression_type"`
	MaxPendingMessages              int               `mapstructure:"max_pending_messages"`
	BatcherBuilderType              int               `mapstructure:"batch_builder_type"`
	PartitionsAutoDiscoveryInterval time.Duration     `mapstructure:"partitions_auto_discovery_interval"`
	BatchingMaxPublishDelay         time.Duration     `mapstructure:"batching_max_publish_delay"`
	BatchingMaxMessages             uint              `mapstructure:"batching_max_messages"`
	BatchingMaxSize                 uint              `mapstructure:"batching_max_size"`
	SendTimeout                     time.Duration     `mapstructure:"send_timeout"`
	DisableBlockIfQueueFull         bool              `mapstructure:"disable_block_if_queue_full"`
	DisableBatching                 bool              `mapstructure:"disable_batching"`
}

Producer defines configuration for producer

Jump to

Keyboard shortcuts

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