Documentation ¶
Index ¶
- Constants
- func TranslateSpan(spanKind ptrace.SpanKind, attributes pcommon.Map, event *modelpb.APMEvent)
- func TranslateTransaction(attributes pcommon.Map, spanStatus ptrace.Status, ...)
- type ConsumeLogsResult
- type ConsumeMetricsResult
- type ConsumeTracesResult
- type Consumer
- func (c *Consumer) Capabilities() consumer.Capabilities
- func (c *Consumer) ConsumeLogs(ctx context.Context, logs plog.Logs) error
- func (c *Consumer) ConsumeLogsWithResult(ctx context.Context, logs plog.Logs) (ConsumeLogsResult, error)
- func (c *Consumer) ConsumeMetrics(ctx context.Context, metrics pmetric.Metrics) error
- func (c *Consumer) ConsumeMetricsWithResult(ctx context.Context, metrics pmetric.Metrics) (ConsumeMetricsResult, error)
- func (c *Consumer) ConsumeTraces(ctx context.Context, traces ptrace.Traces) error
- func (c *Consumer) ConsumeTracesWithResult(ctx context.Context, traces ptrace.Traces) (ConsumeTracesResult, error)
- func (c *Consumer) Stats() ConsumerStats
- type ConsumerConfig
- type ConsumerStats
Constants ¶
const ( AgentNameJaeger = "Jaeger" MaxDataStreamBytes = 100 DisallowedNamespaceRunes = "\\/*?\"<>| ,#:" DisallowedDatasetRunes = "-\\/*?\"<>| ,#:" )
Variables ¶
This section is empty.
Functions ¶
func TranslateSpan ¶
TranslateSpan converts incoming otlp/otel trace data into the expected elasticsearch format.
func TranslateTransaction ¶
func TranslateTransaction( attributes pcommon.Map, spanStatus ptrace.Status, library pcommon.InstrumentationScope, event *modelpb.APMEvent, )
TranslateTransaction converts incoming otlp/otel trace data into the expected elasticsearch format.
Types ¶
type ConsumeLogsResult ¶
ConsumeLogsResult contains the number of rejected log records and error message for partial success response.
type ConsumeMetricsResult ¶
ConsumeMetricsResult contains the number of rejected data points and error message for partial success response.
type ConsumeTracesResult ¶
ConsumeTracesResult contains the number of rejected spans and error message for partial success response.
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer transforms OpenTelemetry data to the Elastic APM data model, sending each payload as a batch to the configured BatchProcessor.
func NewConsumer ¶
func NewConsumer(config ConsumerConfig) *Consumer
NewConsumer returns a new Consumer with the given configuration.
func (*Consumer) Capabilities ¶
func (c *Consumer) Capabilities() consumer.Capabilities
Capabilities is part of the consumer interfaces.
func (*Consumer) ConsumeLogs ¶
ConsumeLogs calls ConsumeLogsWithResult but ignores the result. It exists to satisfy the go.opentelemetry.io/collector/consumer.Logs interface.
func (*Consumer) ConsumeLogsWithResult ¶
func (c *Consumer) ConsumeLogsWithResult(ctx context.Context, logs plog.Logs) (ConsumeLogsResult, error)
ConsumeLogsWithResult consumes OpenTelemetry log data, converting into the Elastic APM log model and sending to the reporter.
func (*Consumer) ConsumeMetrics ¶
ConsumeMetrics calls ConsumeMetricsWithResult but ignores the result. It exists to satisfy the go.opentelemetry.io/collector/consumer.Metrics interface.
func (*Consumer) ConsumeMetricsWithResult ¶
func (c *Consumer) ConsumeMetricsWithResult(ctx context.Context, metrics pmetric.Metrics) (ConsumeMetricsResult, error)
ConsumeMetricsWithResult consumes OpenTelemetry metrics data, converting into the Elastic APM metrics model and sending to the reporter.
func (*Consumer) ConsumeTraces ¶
ConsumeTraces calls ConsumeTracesWithResult but ignores the result. It exists to satisfy the go.opentelemetry.io/collector/consumer.Traces interface.
func (*Consumer) ConsumeTracesWithResult ¶
func (c *Consumer) ConsumeTracesWithResult(ctx context.Context, traces ptrace.Traces) (ConsumeTracesResult, error)
ConsumeTracesWithResult consumes OpenTelemetry trace data, converting into Elastic APM events and reporting to the Elastic APM schema.
func (*Consumer) Stats ¶
func (c *Consumer) Stats() ConsumerStats
Stats returns a snapshot of the current statistics about data consumption.
type ConsumerConfig ¶
type ConsumerConfig struct { // Logger holds a logger for the consumer. If this is nil, then // no logging will be performed. Logger *zap.Logger // Processor holds the modelpb.BatchProcessor which will be invoked // with event batches when consuming OTLP payloads. Processor modelpb.BatchProcessor // Semaphore holds a semaphore on which Processor.HandleStream will acquire a // token before proceeding, to limit concurrency. Semaphore input.Semaphore // RemapOTelMetrics remaps certain OpenTelemetry metrics to elastic metrics. // Note that both, OTel and Elastic, metrics would be published. RemapOTelMetrics bool }
ConsumerConfig holds configuration for Consumer.
type ConsumerStats ¶
type ConsumerStats struct { // UnsupportedMetricsDropped records the number of unsupported metrics // that have been dropped by the consumer. UnsupportedMetricsDropped int64 }
ConsumerStats holds a snapshot of statistics about data consumption.