forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processor/interval] Support Gauges and Summaries (open-telemetry#34805)
**Description:** Adds support for Gauges and Summaries **Link to tracking Issue:** open-telemetry#34803 **Testing:** Unit tests were extended to cover the new behavior **Documentation:** <Describe the documentation added.> --------- Signed-off-by: Arthur Silva Sens <[email protected]>
- Loading branch information
1 parent
a380c99
commit 0e7ce0c
Showing
19 changed files
with
258 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: processor/interval | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Support for gauge and summary metrics. | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [34803] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: Only the last value of a gauge or summary metric is reported in the interval processor, instead of all values. | ||
|
||
# If your change doesn't affect end users or the exported elements of any package, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [user] |
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
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
40 changes: 40 additions & 0 deletions
40
processor/intervalprocessor/testdata/gauges_are_aggregated/input.yaml
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
resourceMetrics: | ||
- schemaUrl: https://test-res-schema.com/schema | ||
resource: | ||
attributes: | ||
- key: asdf | ||
value: | ||
stringValue: foo | ||
scopeMetrics: | ||
- schemaUrl: https://test-scope-schema.com/schema | ||
scope: | ||
name: MyTestInstrument | ||
version: "1.2.3" | ||
attributes: | ||
- key: foo | ||
value: | ||
stringValue: bar | ||
metrics: | ||
- name: test.gauge | ||
gauge: | ||
aggregationTemporality: 2 | ||
dataPoints: | ||
- timeUnixNano: 50 | ||
asDouble: 345 | ||
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb | ||
- timeUnixNano: 20 | ||
asDouble: 258 | ||
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb | ||
# For interval processor point of view, only the last datapoint should be passed through. | ||
- timeUnixNano: 80 | ||
asDouble: 178 | ||
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb |
1 change: 1 addition & 0 deletions
1
processor/intervalprocessor/testdata/gauges_are_aggregated/next.yaml
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
resourceMetrics: [] |
27 changes: 27 additions & 0 deletions
27
processor/intervalprocessor/testdata/gauges_are_aggregated/output.yaml
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
resourceMetrics: | ||
- schemaUrl: https://test-res-schema.com/schema | ||
resource: | ||
attributes: | ||
- key: asdf | ||
value: | ||
stringValue: foo | ||
scopeMetrics: | ||
- schemaUrl: https://test-scope-schema.com/schema | ||
scope: | ||
name: MyTestInstrument | ||
version: "1.2.3" | ||
attributes: | ||
- key: foo | ||
value: | ||
stringValue: bar | ||
metrics: | ||
- name: test.gauge | ||
gauge: | ||
aggregationTemporality: 2 | ||
dataPoints: | ||
- timeUnixNano: 80 | ||
asDouble: 178 | ||
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb |
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 |
---|---|---|
|
@@ -36,4 +36,4 @@ resourceMetrics: | |
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb | ||
stringValue: bbb |
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 |
---|---|---|
|
@@ -36,4 +36,4 @@ resourceMetrics: | |
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb | ||
stringValue: bbb |
2 changes: 1 addition & 1 deletion
2
processor/intervalprocessor/testdata/gauges_are_passed_through/output.yaml
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 +1 @@ | ||
resourceMetrics: [] | ||
resourceMetrics: [] |
63 changes: 63 additions & 0 deletions
63
processor/intervalprocessor/testdata/summaries_are_aggregated/input.yaml
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
resourceMetrics: | ||
- schemaUrl: https://test-res-schema.com/schema | ||
resource: | ||
attributes: | ||
- key: asdf | ||
value: | ||
stringValue: foo | ||
scopeMetrics: | ||
- schemaUrl: https://test-scope-schema.com/schema | ||
scope: | ||
name: MyTestInstrument | ||
version: "1.2.3" | ||
attributes: | ||
- key: foo | ||
value: | ||
stringValue: bar | ||
metrics: | ||
- name: summary.test | ||
summary: | ||
dataPoints: | ||
- timeUnixNano: 50 | ||
quantileValues: | ||
- quantile: 0.25 | ||
value: 50 | ||
- quantile: 0.5 | ||
value: 20 | ||
- quantile: 0.75 | ||
value: 75 | ||
- quantile: 0.95 | ||
value: 10 | ||
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb | ||
- timeUnixNano: 20 | ||
quantileValues: | ||
- quantile: 0.25 | ||
value: 40 | ||
- quantile: 0.5 | ||
value: 10 | ||
- quantile: 0.75 | ||
value: 60 | ||
- quantile: 0.95 | ||
value: 5 | ||
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb | ||
# Only last summary should pass through | ||
- timeUnixNano: 80 | ||
quantileValues: | ||
- quantile: 0.25 | ||
value: 80 | ||
- quantile: 0.5 | ||
value: 35 | ||
- quantile: 0.75 | ||
value: 90 | ||
- quantile: 0.95 | ||
value: 15 | ||
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb |
1 change: 1 addition & 0 deletions
1
processor/intervalprocessor/testdata/summaries_are_aggregated/next.yaml
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
resourceMetrics: [] |
Oops, something went wrong.