From c7d70f71bbede302eadc4907e251e0ecd4f083f4 Mon Sep 17 00:00:00 2001 From: George Brighton Date: Thu, 30 Nov 2023 01:14:39 +0000 Subject: [PATCH] Fix SIGSEGV due to missing ReportComponentStatus facility --- modules/distributor/receiver/shim.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/distributor/receiver/shim.go b/modules/distributor/receiver/shim.go index cf9ecd41d82..11fc47c8d0e 100644 --- a/modules/distributor/receiver/shim.go +++ b/modules/distributor/receiver/shim.go @@ -228,11 +228,16 @@ func New(receiverCfg map[string]interface{}, pusher TracesPusher, middleware Mid // todo: propagate a real context? translate our log configuration into zap? ctx := context.Background() - params := receiver.CreateSettings{TelemetrySettings: component.TelemetrySettings{ - Logger: zapLogger, - TracerProvider: tracenoop.NewTracerProvider(), - MeterProvider: metricnoop.NewMeterProvider(), - }} + params := receiver.CreateSettings{ + TelemetrySettings: component.TelemetrySettings{ + Logger: zapLogger, + TracerProvider: tracenoop.NewTracerProvider(), + MeterProvider: metricnoop.NewMeterProvider(), + ReportComponentStatus: func(*component.StatusEvent) error { + return nil + }, + }, + } for componentID, cfg := range conf.Receivers { factoryBase := receiverFactories[componentID.Type()]