Skip to content

Commit

Permalink
[jaeger-v2] Enable queueing configuration in storage exporter (#6080)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Towards #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:/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]>
  • Loading branch information
mahadzaryab1 authored Oct 14, 2024
1 parent 4beead7 commit 4688cc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/jaeger/internal/exporters/storageexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package storageexporter
import (
"github.com/asaskevich/govalidator"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/exporter/exporterhelper"
)

var (
Expand All @@ -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:"queue" valid:"optional"`
}

func (cfg *Config) Validate() error {
Expand Down
4 changes: 2 additions & 2 deletions cmd/jaeger/internal/exporters/storageexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down

0 comments on commit 4688cc0

Please sign in to comment.