Documentation
¶
Overview ¶
Package kafkareceiver receives traces from Kafka.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricViews ¶
MetricViews return metric views for Kafka receiver.
func NewFactory ¶
func NewFactory(options ...FactoryOption) component.ReceiverFactory
NewFactory creates Kafka receiver factory.
Types ¶
type Config ¶
type Config struct { config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct // 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 consume from (default "otlp_spans") Topic string `mapstructure:"topic"` // Encoding of the messages (default "otlp_proto") Encoding string `mapstructure:"encoding"` // The consumer group that receiver will be consuming messages from (default "otel-collector") GroupID string `mapstructure:"group_id"` // The consumer client ID that receiver will use (default "otel-collector") ClientID string `mapstructure:"client_id"` // Metadata is the namespace for metadata management properties used by the // Client, and shared by the Producer/Consumer. Metadata kafkaexporter.Metadata `mapstructure:"metadata"` Authentication kafkaexporter.Authentication `mapstructure:"auth"` }
Config defines configuration for Kafka receiver.
type FactoryOption ¶
type FactoryOption func(factory *kafkaReceiverFactory)
FactoryOption applies changes to kafkaExporterFactory.
func WithLogsUnmarshalers ¶ added in v0.26.0
func WithLogsUnmarshalers(logsUnmarshalers ...LogsUnmarshaler) FactoryOption
WithLogsUnmarshalers adds LogsUnmarshalers.
func WithMetricsUnmarshalers ¶ added in v0.29.0
func WithMetricsUnmarshalers(metricsUnmarshalers ...MetricsUnmarshaler) FactoryOption
WithMetricsUnmarshalers adds MetricsUnmarshalers.
func WithTracesUnmarshalers ¶ added in v0.26.0
func WithTracesUnmarshalers(tracesUnmarshalers ...TracesUnmarshaler) FactoryOption
WithTracesUnmarshalers adds Unmarshalers.
type LogsUnmarshaler ¶ added in v0.26.0
type LogsUnmarshaler interface { // Unmarshal deserializes the message body into traces. Unmarshal([]byte) (pdata.Logs, error) // Encoding of the serialized messages. Encoding() string }
LogsUnmarshaler deserializes the message body.
Click to show internal directories.
Click to hide internal directories.