-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processor/cumulativetodelta] Add include/exclude configuration (#8952)
* Added include/exclude config options * Fixed linting issues * run go mod tidy * Updated changelog * Update processor/cumulativetodeltaprocessor/processor.go Co-authored-by: Anthony Mirabella <a9@aneurysm9.com> * Added back Developement status * Noop change to trigger pipeline * Added include/exclude config options * Fixed linting issues * Updated changelog * Update processor/cumulativetodeltaprocessor/processor.go Co-authored-by: Anthony Mirabella <a9@aneurysm9.com> * Added back Developement status * Noop change to trigger pipeline * fix changelog * Update CHANGELOG.md Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com> * Update processor/cumulativetodeltaprocessor/config.go Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com> * added deprecation entry * Added config test for regexp * updated changelog Co-authored-by: Anthony Mirabella <a9@aneurysm9.com> Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
- Loading branch information
1 parent
bff698a
commit 1a78191
Showing
14 changed files
with
818 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,74 @@ | ||
# Cumulative to Delta Processor | ||
|
||
**Status: under development; Not recommended for production usage.** | ||
|
||
Supported pipeline types: metrics | ||
|
||
## Description | ||
|
||
The cumulative to delta processor (`cumulativetodeltaprocessor`) converts cumulative sum metrics to cumulative delta. | ||
The cumulative to delta processor (`cumulativetodeltaprocessor`) converts cumulative sum metrics to cumulative delta. Non-monotonic sums are excluded. | ||
|
||
## Configuration | ||
|
||
Configuration is specified through a list of metrics. The processor uses metric names to identify a set of cumulative metrics and converts them from cumulative to delta. | ||
|
||
The following settings can be optionally configured: | ||
|
||
- `metrics`: The processor uses metric names to identify a set of cumulative metrics and converts them to delta. | ||
- `include`: List of metrics names or patterns to convert to delta. | ||
- `exclude`: List of metrics names or patterns to not convert to delta. **If a metric name matches both include and exclude, exclude takes precedence.** | ||
- `max_stale`: The total time a state entry will live past the time it was last seen. Set to 0 to retain state indefinitely. Default: 0 | ||
- `metrics`: Deprecated. The processor uses metric names to identify a set of cumulative metrics and converts them to delta. | ||
|
||
If neither include nor exclude are supplied, no filtering is applied. | ||
|
||
#### Examples | ||
|
||
```yaml | ||
processors: | ||
# processor name: cumulativetodelta | ||
cumulativetodelta: | ||
|
||
# list the exact cumulative sum metrics to convert to delta | ||
include: | ||
metrics: | ||
- <metric_1_name> | ||
- <metric_2_name> | ||
. | ||
. | ||
- <metric_n_name> | ||
match_type: strict | ||
``` | ||
```yaml | ||
processors: | ||
# processor name: cumulativetodelta | ||
cumulativetodelta: | ||
|
||
#### Example | ||
# Convert cumulative sum metrics to delta | ||
# if and only if 'metric' is in the name | ||
include: | ||
metrics: | ||
- "*metric*" | ||
match_type: regexp | ||
``` | ||
```yaml | ||
processors: | ||
# processor name: cumulativetodelta | ||
cumulativetodelta: | ||
|
||
# list the cumulative sum metrics to convert to delta | ||
metrics: | ||
- <metric_1_name> | ||
- <metric_2_name> | ||
. | ||
. | ||
- <metric_n_name> | ||
# Convert cumulative sum metrics to delta | ||
# if and only if 'metric' is not in the name | ||
exclude: | ||
metrics: | ||
- "*metric*" | ||
match_type: regexp | ||
``` | ||
```yaml | ||
processors: | ||
# processor name: cumulativetodelta | ||
cumulativetodelta: | ||
# If include/exclude are not specified | ||
# convert all cumulative sum metrics to delta | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.