From 1fc1cac7ba4324c09a3591ffc0dba6f7b38f99a4 Mon Sep 17 00:00:00 2001 From: Mahad Zaryab Date: Sun, 13 Oct 2024 15:13:37 -0400 Subject: [PATCH 1/2] Enable Queue Config In Storage Exporter Signed-off-by: Mahad Zaryab --- cmd/jaeger/internal/exporters/storageexporter/config.go | 4 +++- cmd/jaeger/internal/exporters/storageexporter/factory.go | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/jaeger/internal/exporters/storageexporter/config.go b/cmd/jaeger/internal/exporters/storageexporter/config.go index c6b171ecba7..d958e405793 100644 --- a/cmd/jaeger/internal/exporters/storageexporter/config.go +++ b/cmd/jaeger/internal/exporters/storageexporter/config.go @@ -6,6 +6,7 @@ package storageexporter import ( "github.com/asaskevich/govalidator" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/exporter/exporterhelper" ) var ( @@ -15,7 +16,8 @@ var ( // Config defines configuration for jaeger_storage_exporter. type Config struct { - TraceStorage string `valid:"required" mapstructure:"trace_storage"` + TraceStorage string `mapstructure:"trace_storage" valid:"required"` + QueueConfig exporterhelper.QueueConfig `mapstructure:"sending_queue" valid:"optional"` } func (cfg *Config) Validate() error { diff --git a/cmd/jaeger/internal/exporters/storageexporter/factory.go b/cmd/jaeger/internal/exporters/storageexporter/factory.go index d57a4f55b0e..341f0299d7c 100644 --- a/cmd/jaeger/internal/exporters/storageexporter/factory.go +++ b/cmd/jaeger/internal/exporters/storageexporter/factory.go @@ -38,10 +38,10 @@ func createTracesExporter(ctx context.Context, set exporter.Settings, config com return exporterhelper.NewTracesExporter(ctx, set, cfg, ex.pushTraces, exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}), - // Disable Timeout/RetryOnFailure and SendingQueue + // Disable Timeout/RetryOnFailure exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}), exporterhelper.WithRetry(configretry.BackOffConfig{Enabled: false}), - exporterhelper.WithQueue(exporterhelper.QueueConfig{Enabled: false}), + exporterhelper.WithQueue(cfg.QueueConfig), exporterhelper.WithStart(ex.start), exporterhelper.WithShutdown(ex.close), ) From 6ac51b68862e0791b9f5e2984c089ae3e708e88e Mon Sep 17 00:00:00 2001 From: Mahad Zaryab Date: Sun, 13 Oct 2024 22:20:32 -0400 Subject: [PATCH 2/2] Change Field Name Signed-off-by: Mahad Zaryab --- cmd/jaeger/internal/exporters/storageexporter/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/jaeger/internal/exporters/storageexporter/config.go b/cmd/jaeger/internal/exporters/storageexporter/config.go index d958e405793..992b5f34f54 100644 --- a/cmd/jaeger/internal/exporters/storageexporter/config.go +++ b/cmd/jaeger/internal/exporters/storageexporter/config.go @@ -17,7 +17,7 @@ var ( // Config defines configuration for jaeger_storage_exporter. type Config struct { TraceStorage string `mapstructure:"trace_storage" valid:"required"` - QueueConfig exporterhelper.QueueConfig `mapstructure:"sending_queue" valid:"optional"` + QueueConfig exporterhelper.QueueConfig `mapstructure:"queue" valid:"optional"` } func (cfg *Config) Validate() error {