Documentation ¶
Index ¶
- Variables
- type ExampleExporter
- func (exp *ExampleExporter) Capabilities() consumer.Capabilities
- func (exp *ExampleExporter) ConsumeLogs(_ context.Context, ld plog.Logs) error
- func (exp *ExampleExporter) ConsumeMetrics(_ context.Context, md pmetric.Metrics) error
- func (exp *ExampleExporter) ConsumeTraces(_ context.Context, td ptrace.Traces) error
- func (exp *ExampleExporter) Shutdown(context.Context) error
- func (exp *ExampleExporter) Start(_ context.Context, _ component.Host) error
- type ExampleExporterConfig
- type ExampleProcessor
- type ExampleProcessorConfig
- type ExampleReceiver
- type ExampleReceiverConfig
Constants ¶
This section is empty.
Variables ¶
var ExampleExporterFactory = exporter.NewFactory( typeStr, createExporterDefaultConfig, exporter.WithTraces(createTracesExporter, stability), exporter.WithMetrics(createMetricsExporter, stability), exporter.WithLogs(createLogsExporter, stability), )
ExampleExporterFactory is factory for ExampleExporter.
var ExampleProcessorFactory = component.NewProcessorFactory( procType, createDefaultConfig, component.WithTracesProcessor(createTracesProcessor, component.StabilityLevelDevelopment), component.WithMetricsProcessor(createMetricsProcessor, component.StabilityLevelDevelopment), component.WithLogsProcessor(createLogsProcessor, component.StabilityLevelDevelopment))
ExampleProcessorFactory is factory for ExampleProcessor.
var ExampleReceiverFactory = receiver.NewFactory( receiverType, createReceiverDefaultConfig, receiver.WithTraces(createTracesReceiver, component.StabilityLevelDevelopment), receiver.WithMetrics(createMetricsReceiver, component.StabilityLevelDevelopment), receiver.WithLogs(createLogsReceiver, component.StabilityLevelDevelopment))
ExampleReceiverFactory is factory for ExampleReceiver.
Functions ¶
This section is empty.
Types ¶
type ExampleExporter ¶
type ExampleExporter struct { Traces []ptrace.Traces Metrics []pmetric.Metrics Logs []plog.Logs Started bool Stopped bool }
ExampleExporter stores consumed traces and metrics for testing purposes.
func (*ExampleExporter) Capabilities ¶
func (exp *ExampleExporter) Capabilities() consumer.Capabilities
func (*ExampleExporter) ConsumeLogs ¶
func (*ExampleExporter) ConsumeMetrics ¶
ConsumeMetrics receives pmetric.Metrics for processing by the Metrics.
func (*ExampleExporter) ConsumeTraces ¶
ConsumeTraces receives ptrace.Traces for processing by the consumer.Traces.
func (*ExampleExporter) Shutdown ¶
func (exp *ExampleExporter) Shutdown(context.Context) error
Shutdown is invoked during shutdown.
type ExampleExporterConfig ¶
type ExampleExporterConfig struct {
config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
}
ExampleExporterConfig config for ExampleExporter.
type ExampleProcessor ¶
type ExampleProcessor struct { consumer.Traces consumer.Metrics consumer.Logs Started bool Stopped bool }
func (*ExampleProcessor) Capabilities ¶
func (ep *ExampleProcessor) Capabilities() consumer.Capabilities
type ExampleProcessorConfig ¶
type ExampleProcessorConfig struct {
config.ProcessorSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
}
ExampleProcessorConfig config for ExampleProcessor.
type ExampleReceiver ¶
type ExampleReceiver struct { consumer.Traces consumer.Metrics consumer.Logs Started bool Stopped bool }
ExampleReceiver allows producing traces and metrics for testing purposes.
type ExampleReceiverConfig ¶
type ExampleReceiverConfig struct {
config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
}
ExampleReceiverConfig config for ExampleReceiver.