Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[processor/groupbytrace] Add num_workers doc to README #17305

Merged
merged 5 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions processor/groupbytraceprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ processors:
groupbytrace/2:
wait_duration: 10s
num_traces: 1000
num_workers: 2
```

## Configuration

Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using the processor.

The `num_traces` property tells the processor what's the maximum number of traces to keep in the internal storage. A higher `num_traces` might incur in a higher memory usage.
The `num_traces` (default=1,000,000) property tells the processor what's the maximum number of traces to keep in the internal storage. A higher `num_traces` might incur in a higher memory usage.

The `wait_duration` property tells the processor for how long it should keep traces in the internal storage. Once a trace is kept for this duration, it's then released to the next consumer and removed from the internal storage. Spans from a trace that has been released will be kept for the entire duration again.
The `wait_duration` (default=1s) property tells the processor for how long it should keep traces in the internal storage. Once a trace is kept for this duration, it's then released to the next consumer and removed from the internal storage. Spans from a trace that has been released will be kept for the entire duration again.

The `num_workers` (default=1) property controls how many concurrent workers the processor will use to process traces. If you are looking to optimize this value
then using GOMAXPROCS could be considered as a starting point.

## Metrics

Expand Down
2 changes: 1 addition & 1 deletion processor/groupbytraceprocessor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Config struct {
// Default: 1_000_000.
NumTraces int `mapstructure:"num_traces"`

// NumWorkers is a number of workers processing event queue. Should be equal to physical processors number.
// NumWorkers is a number of workers processing event queue.
bryan-aguilar marked this conversation as resolved.
Show resolved Hide resolved
// Default: 1.
NumWorkers int `mapstructure:"num_workers"`

Expand Down