-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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/interval] Support Gauges and Summaries #34805
Changes from all commits
ee0439b
76977d6
63bb73d
131e812
2a2f9ff
e19542a
5671166
9254ffb
88448a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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] |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
resourceMetrics: [] |
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ resourceMetrics: | |
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb | ||
stringValue: bbb |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ resourceMetrics: | |
attributes: | ||
- key: aaa | ||
value: | ||
stringValue: bbb | ||
stringValue: bbb |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
resourceMetrics: [] | ||
resourceMetrics: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
resourceMetrics: | ||
- schemaUrl: https://test-res-schema.com/schema | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have a feeling that this is copied from some existing files, but I wanted to mention that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm merging as is, but if you feel like fixing this, open a follow-up PR. |
||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
resourceMetrics: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add one for non-monotonic sums? IMO they're no different than gauges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be ok with that, but I remember @sh0rez telling me that non-monotonic sums are a bit trickier. Do you have any thoughts?
But in any case, I'd be happy to do so in a separate PR. I'm already getting lost with my commits 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
feels more elegant, but no strong opinion at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like @sh0rez 's idea. Though, I would go for
pass_through
instead ofignore
. To be a bit more explicit