Documentation ¶
Index ¶
- Variables
- func ExampleComponents() (component.Factories, error)
- 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 = component.NewExporterFactory( typeStr, createExporterDefaultConfig, component.WithTracesExporter(createTracesExporter, stability), component.WithMetricsExporter(createMetricsExporter, stability), component.WithLogsExporter(createLogsExporter, stability), )
ExampleExporterFactory is factory for ExampleExporter.
var ExampleProcessorFactory = component.NewProcessorFactory( procType, createDefaultConfig, component.WithTracesProcessor(createTracesProcessor, component.StabilityLevelInDevelopment), component.WithMetricsProcessor(createMetricsProcessor, component.StabilityLevelInDevelopment), component.WithLogsProcessor(createLogsProcessor, component.StabilityLevelInDevelopment))
ExampleProcessorFactory is factory for ExampleProcessor.
var ExampleReceiverFactory = component.NewReceiverFactory( receiverType, createReceiverDefaultConfig, component.WithTracesReceiver(createTracesReceiver, component.StabilityLevelInDevelopment), component.WithMetricsReceiver(createMetricsReceiver, component.StabilityLevelInDevelopment), component.WithLogsReceiver(createLogsReceiver, component.StabilityLevelInDevelopment))
ExampleReceiverFactory is factory for ExampleReceiver.
Functions ¶
func ExampleComponents ¶
ExampleComponents registers example factories. This is only used by tests.
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.