-
Notifications
You must be signed in to change notification settings - Fork 454
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
chore: Add metric integration tests #2424
Changes from all commits
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,133 @@ | ||
{ | ||
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. same as |
||
"resourceMetrics": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "service.name", | ||
"value": { | ||
"stringValue": "metrics-integration-test" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeMetrics": [ | ||
{ | ||
"scope": { | ||
"name": "meter" | ||
}, | ||
"metrics": [ | ||
{ | ||
"name": "counter_u64", | ||
"sum": { | ||
"dataPoints": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "mykey1", | ||
"value": { | ||
"stringValue": "mydifferentval" | ||
} | ||
}, | ||
{ | ||
"key": "mykey2", | ||
"value": { | ||
"stringValue": "myvalue2" | ||
} | ||
} | ||
], | ||
"startTimeUnixNano": "1734094309366798000", | ||
"timeUnixNano": "1734094317871514000", | ||
"asInt": "15" | ||
} | ||
], | ||
"aggregationTemporality": 2, | ||
"isMonotonic": true | ||
} | ||
}, | ||
{ | ||
"name": "example_histogram", | ||
"histogram": { | ||
"dataPoints": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "mykey3", | ||
"value": { | ||
"stringValue": "myvalue4" | ||
} | ||
} | ||
], | ||
"startTimeUnixNano": "1734094309366875000", | ||
"timeUnixNano": "1734094317871537000", | ||
"count": "1", | ||
"sum": 42, | ||
"bucketCounts": [ | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"1", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0" | ||
], | ||
"explicitBounds": [ | ||
0, | ||
5, | ||
10, | ||
25, | ||
50, | ||
75, | ||
100, | ||
250, | ||
500, | ||
750, | ||
1000, | ||
2500, | ||
5000, | ||
7500, | ||
10000 | ||
], | ||
"min": 42, | ||
"max": 42 | ||
} | ||
], | ||
"aggregationTemporality": 2 | ||
} | ||
}, | ||
{ | ||
"name": "example_up_down_counter", | ||
"sum": { | ||
"dataPoints": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "mykey5", | ||
"value": { | ||
"stringValue": "myvalue5" | ||
} | ||
} | ||
], | ||
"startTimeUnixNano": "1734094309366941000", | ||
"timeUnixNano": "1734094317871548000", | ||
"asInt": "-1" | ||
} | ||
], | ||
"aggregationTemporality": 2 | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,114 +6,128 @@ | |
{ | ||
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. This file was already here, but was seemingly unused, so i've repurposed it to match the style of the other tests |
||
"key": "service.name", | ||
"value": { | ||
"stringValue": "my.service" | ||
"stringValue": "metrics-integration-test" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeMetrics": [ | ||
{ | ||
"scope": { | ||
"name": "my.library", | ||
"version": "1.0.0", | ||
"attributes": [ | ||
{ | ||
"key": "my.scope.attribute", | ||
"value": { | ||
"stringValue": "some scope attribute" | ||
} | ||
} | ||
] | ||
"name": "meter" | ||
}, | ||
"metrics": [ | ||
{ | ||
"name": "my.counter", | ||
"unit": "1", | ||
"description": "I am a Counter", | ||
"metadata": [], | ||
"name": "counter_u64", | ||
"sum": { | ||
"aggregationTemporality": 1, | ||
"isMonotonic": true, | ||
"dataPoints": [ | ||
{ | ||
"asDouble": 5, | ||
"startTimeUnixNano": "1544712660300000000", | ||
"timeUnixNano": "1544712660300000000", | ||
"attributes": [ | ||
{ | ||
"key": "my.counter.attr", | ||
"key": "mykey1", | ||
"value": { | ||
"stringValue": "some value" | ||
"stringValue": "myvalue1" | ||
} | ||
}, | ||
{ | ||
"key": "mykey2", | ||
"value": { | ||
"stringValue": "myvalue2" | ||
} | ||
} | ||
], | ||
"exemplars": [], | ||
"flags": 0 | ||
"startTimeUnixNano": "1734094309366798000", | ||
"timeUnixNano": "1734094317871514000", | ||
"asInt": "10" | ||
} | ||
] | ||
], | ||
"aggregationTemporality": 2, | ||
"isMonotonic": true | ||
} | ||
}, | ||
{ | ||
"name": "my.gauge", | ||
"unit": "1", | ||
"description": "I am a Gauge", | ||
"metadata": [], | ||
"gauge": { | ||
"name": "example_histogram", | ||
"histogram": { | ||
"dataPoints": [ | ||
{ | ||
"asDouble": 10, | ||
"startTimeUnixNano": "1544712660300000000", | ||
"timeUnixNano": "1544712660300000000", | ||
"attributes": [ | ||
{ | ||
"key": "my.gauge.attr", | ||
"key": "mykey3", | ||
"value": { | ||
"stringValue": "some value" | ||
"stringValue": "myvalue4" | ||
} | ||
} | ||
], | ||
"exemplars": [], | ||
"flags": 0 | ||
"startTimeUnixNano": "1734094309366875000", | ||
"timeUnixNano": "1734094317871537000", | ||
"count": "1", | ||
"sum": 42, | ||
"bucketCounts": [ | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"1", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0", | ||
"0" | ||
], | ||
"explicitBounds": [ | ||
0, | ||
5, | ||
10, | ||
25, | ||
50, | ||
75, | ||
100, | ||
250, | ||
500, | ||
750, | ||
1000, | ||
2500, | ||
5000, | ||
7500, | ||
10000 | ||
], | ||
"min": 42, | ||
"max": 42 | ||
} | ||
] | ||
], | ||
"aggregationTemporality": 2 | ||
} | ||
}, | ||
{ | ||
"name": "my.histogram", | ||
"unit": "1", | ||
"description": "I am a Histogram", | ||
"metadata": [], | ||
"histogram": { | ||
"aggregationTemporality": 1, | ||
"name": "example_up_down_counter", | ||
"sum": { | ||
"dataPoints": [ | ||
{ | ||
"startTimeUnixNano": "1544712660300000000", | ||
"timeUnixNano": "1544712660300000000", | ||
"count": 2, | ||
"sum": 2, | ||
"bucketCounts": [1,1], | ||
"explicitBounds": [1], | ||
"min": 0, | ||
"max": 2, | ||
"attributes": [ | ||
{ | ||
"key": "my.histogram.attr", | ||
"key": "mykey5", | ||
"value": { | ||
"stringValue": "some value" | ||
"stringValue": "myvalue5" | ||
} | ||
} | ||
], | ||
"exemplars": [], | ||
"flags": 0 | ||
"startTimeUnixNano": "1734094309366941000", | ||
"timeUnixNano": "1734094317871548000", | ||
"asInt": "-1" | ||
} | ||
] | ||
], | ||
"aggregationTemporality": 2 | ||
} | ||
} | ||
], | ||
"schemaUrl": "whatever" | ||
] | ||
} | ||
], | ||
"schemaUrl": "whatever" | ||
] | ||
} | ||
] | ||
} | ||
} |
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: we can remove logs,metrics features as they are anyway by default added.