Documentation ¶
Index ¶
- func ConfigureAuthentication(config Authentication, saramaConfig *sarama.Config) error
- func NewFactory(options ...FactoryOption) component.ExporterFactory
- type Authentication
- type Config
- type FactoryOption
- type KerberosConfig
- type Message
- type Metadata
- type MetadataRetry
- type MetricsMarshaller
- type PlainTextConfig
- type TracesMarshaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureAuthentication ¶ added in v0.11.0
func ConfigureAuthentication(config Authentication, saramaConfig *sarama.Config) error
ConfigureAuthentication configures authentication in sarama.Config.
func NewFactory ¶
func NewFactory(options ...FactoryOption) component.ExporterFactory
NewFactory creates Kafka exporter factory.
Types ¶
type Authentication ¶ added in v0.11.0
type Authentication struct { PlainText *PlainTextConfig `mapstructure:"plain_text"` TLS *configtls.TLSClientSetting `mapstructure:"tls"` Kerberos *KerberosConfig `mapstructure:"kerberos"` }
Authentication defines authentication.
type Config ¶
type Config struct { configmodels.ExporterSettings `mapstructure:",squash"` exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` // The list of kafka brokers (default localhost:9092) Brokers []string `mapstructure:"brokers"` // Kafka protocol version ProtocolVersion string `mapstructure:"protocol_version"` // The name of the kafka topic to export to (default otlp_spans for traces, otlp_metrics for metrics) Topic string `mapstructure:"topic"` // Encoding of messages (default "otlp_proto") Encoding string `mapstructure:"encoding"` // Metadata is the namespace for metadata management properties used by the // Client, and shared by the Producer/Consumer. Metadata Metadata `mapstructure:"metadata"` // Authentication defines used authentication mechanism. Authentication Authentication `mapstructure:"auth"` }
Config defines configuration for Kafka exporter.
type FactoryOption ¶ added in v0.9.0
type FactoryOption func(factory *kafkaExporterFactory)
FactoryOption applies changes to kafkaExporterFactory.
func WithAddTracesMarshallers ¶ added in v0.16.0
func WithAddTracesMarshallers(encodingMarshaller map[string]TracesMarshaller) FactoryOption
WithAddTracesMarshallers adds tracesMarshallers.
type KerberosConfig ¶ added in v0.11.0
type KerberosConfig struct { ServiceName string `mapstructure:"service_name"` Realm string `mapstructure:"realm"` UseKeyTab bool `mapstructure:"use_keytab"` Username string `mapstructure:"username"` Password string `mapstructure:"password" json:"-"` ConfigPath string `mapstructure:"config_file"` KeyTabPath string `mapstructure:"keytab_file"` }
KerberosConfig defines kereros configuration.
type Message ¶ added in v0.9.0
type Message struct {
Value []byte
}
Message encapsulates Kafka's message payload.
type Metadata ¶
type Metadata struct { // Whether to maintain a full set of metadata for all topics, or just // the minimal set that has been necessary so far. The full set is simpler // and usually more convenient, but can take up a substantial amount of // memory if you have many topics and partitions. Defaults to true. Full bool `mapstructure:"full"` // Retry configuration for metadata. // This configuration is useful to avoid race conditions when broker // is starting at the same time as collector. Retry MetadataRetry `mapstructure:"retry"` }
Metadata defines configuration for retrieving metadata from the broker.
type MetadataRetry ¶
type MetadataRetry struct { // The total number of times to retry a metadata request when the // cluster is in the middle of a leader election or at startup (default 3). Max int `mapstructure:"max"` // How long to wait for leader election to occur before retrying // (default 250ms). Similar to the JVM's `retry.backoff.ms`. Backoff time.Duration `mapstructure:"backoff"` }
MetadataRetry defines retry configuration for Metadata.
type MetricsMarshaller ¶ added in v0.16.0
type MetricsMarshaller interface { // Marshal serializes metrics into Messages Marshal(metrics pdata.Metrics) ([]Message, error) // Encoding returns encoding name Encoding() string }
MetricsMarshaller marshals metrics into Message array
type PlainTextConfig ¶ added in v0.11.0
type PlainTextConfig struct { Username string `mapstructure:"username"` Password string `mapstructure:"password"` }
PlainTextConfig defines plaintext authentication.
Click to show internal directories.
Click to hide internal directories.