Skip to content

Commit 4688cc0

Browse files
authored
[jaeger-v2] Enable queueing configuration in storage exporter (jaegertracing#6080)
## Which problem is this PR solving? - Towards jaegertracing#6040 ## Description of the changes - Added the `sending_queue` configuration to `jaeger_storage_exporter` from`exporterhelper` which will allow for enabling a queue when writing spans to any backend store. - This will allow for achieving parity in jaeger-v2 with the v1 collector's `--collector.queue-size` flag as `sending_queue` has a configuration for `queue_size`. - [Migration guide](https://docs.google.com/document/d/18B1yTMewRft2N0nW9K-ecVRTt5VaNgnrPTW1eL236t4/edit?usp=sharing) updated for the mapping between v1 and v2 ## How was this change tested? - ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Mahad Zaryab <[email protected]>
1 parent 4beead7 commit 4688cc0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cmd/jaeger/internal/exporters/storageexporter/config.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package storageexporter
66
import (
77
"github.com/asaskevich/govalidator"
88
"go.opentelemetry.io/collector/component"
9+
"go.opentelemetry.io/collector/exporter/exporterhelper"
910
)
1011

1112
var (
@@ -15,7 +16,8 @@ var (
1516

1617
// Config defines configuration for jaeger_storage_exporter.
1718
type Config struct {
18-
TraceStorage string `valid:"required" mapstructure:"trace_storage"`
19+
TraceStorage string `mapstructure:"trace_storage" valid:"required"`
20+
QueueConfig exporterhelper.QueueConfig `mapstructure:"queue" valid:"optional"`
1921
}
2022

2123
func (cfg *Config) Validate() error {

cmd/jaeger/internal/exporters/storageexporter/factory.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ func createTracesExporter(ctx context.Context, set exporter.Settings, config com
3838
return exporterhelper.NewTracesExporter(ctx, set, cfg,
3939
ex.pushTraces,
4040
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
41-
// Disable Timeout/RetryOnFailure and SendingQueue
41+
// Disable Timeout/RetryOnFailure
4242
exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}),
4343
exporterhelper.WithRetry(configretry.BackOffConfig{Enabled: false}),
44-
exporterhelper.WithQueue(exporterhelper.QueueConfig{Enabled: false}),
44+
exporterhelper.WithQueue(cfg.QueueConfig),
4545
exporterhelper.WithStart(ex.start),
4646
exporterhelper.WithShutdown(ex.close),
4747
)

0 commit comments

Comments
 (0)