Skip to content

Commit ea63d21

Browse files
authored
[chore] Update histogram tests (#1713)
* fix test * [chore] add apiserver metrics * reduce flakiness * use a different metric for apiserver * reduce expected files * [chore] update k8s control plane histogram tests * fix render
1 parent 2b3e970 commit ea63d21

File tree

95 files changed

+201496
-638979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+201496
-638979
lines changed

functional_tests/histogram/histogram_test.go

Lines changed: 225 additions & 226 deletions
Large diffs are not rendered by default.

functional_tests/histogram/testdata/expected/v1.25/api_metrics.yaml

Lines changed: 0 additions & 19654 deletions
This file was deleted.

functional_tests/histogram/testdata/expected/v1.25/controller_manager_metrics.yaml

Lines changed: 0 additions & 4578 deletions
This file was deleted.
Lines changed: 298 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,298 @@
1+
resourceMetrics:
2+
- resource:
3+
attributes:
4+
- key: host.name
5+
value:
6+
stringValue: kind-control-plane
7+
- key: http.scheme
8+
value:
9+
stringValue: http
10+
- key: k8s.cluster.name
11+
value:
12+
stringValue: sock
13+
- key: k8s.namespace.name
14+
value:
15+
stringValue: kube-system
16+
- key: k8s.node.name
17+
value:
18+
stringValue: kind-control-plane
19+
- key: k8s.pod.name
20+
value:
21+
stringValue: coredns-565d847f94-pfgqh
22+
- key: k8s.pod.uid
23+
value:
24+
stringValue: 8b269075-7bde-4600-8c4e-a31911015464
25+
- key: net.host.name
26+
value:
27+
stringValue: 10.244.0.4
28+
- key: net.host.port
29+
value:
30+
stringValue: "9153"
31+
- key: os.type
32+
value:
33+
stringValue: linux
34+
- key: server.address
35+
value:
36+
stringValue: 10.244.0.4
37+
- key: server.port
38+
value:
39+
stringValue: "9153"
40+
- key: service.instance.id
41+
value:
42+
stringValue: 10.244.0.4:9153
43+
- key: service.name
44+
value:
45+
stringValue: coredns
46+
- key: url.scheme
47+
value:
48+
stringValue: http
49+
schemaUrl: https://opentelemetry.io/schemas/1.6.1
50+
scopeMetrics:
51+
- metrics:
52+
- description: Histogram of the time (in seconds) each request took per zone.
53+
histogram:
54+
aggregationTemporality: 2
55+
dataPoints:
56+
- attributes:
57+
- key: server
58+
value:
59+
stringValue: dns://:53
60+
- key: zone
61+
value:
62+
stringValue: .
63+
bucketCounts:
64+
- "8"
65+
- "1"
66+
- "0"
67+
- "1"
68+
- "1"
69+
- "0"
70+
- "0"
71+
- "0"
72+
- "0"
73+
- "1"
74+
- "0"
75+
- "0"
76+
- "0"
77+
- "1"
78+
- "0"
79+
- "0"
80+
- "0"
81+
count: "13"
82+
explicitBounds:
83+
- 0.00025
84+
- 0.0005
85+
- 0.001
86+
- 0.002
87+
- 0.004
88+
- 0.008
89+
- 0.016
90+
- 0.032
91+
- 0.064
92+
- 0.128
93+
- 0.256
94+
- 0.512
95+
- 1.024
96+
- 2.048
97+
- 4.096
98+
- 8.192
99+
startTimeUnixNano: "1000000"
100+
sum: 1.5926926500000003
101+
timeUnixNano: "1000000"
102+
metadata:
103+
- key: prometheus.type
104+
value:
105+
stringValue: histogram
106+
name: coredns_dns_request_duration_seconds
107+
- description: Size of the EDNS0 UDP buffer in bytes (64K for TCP) per zone and protocol.
108+
histogram:
109+
aggregationTemporality: 2
110+
dataPoints:
111+
- attributes:
112+
- key: proto
113+
value:
114+
stringValue: udp
115+
- key: server
116+
value:
117+
stringValue: dns://:53
118+
- key: zone
119+
value:
120+
stringValue: .
121+
bucketCounts:
122+
- "0"
123+
- "13"
124+
- "0"
125+
- "0"
126+
- "0"
127+
- "0"
128+
- "0"
129+
- "0"
130+
- "0"
131+
- "0"
132+
- "0"
133+
- "0"
134+
- "0"
135+
- "0"
136+
- "0"
137+
count: "13"
138+
explicitBounds:
139+
- 0
140+
- 100
141+
- 200
142+
- 300
143+
- 400
144+
- 511
145+
- 1023
146+
- 2047
147+
- 4095
148+
- 8291
149+
- 16000
150+
- 32000
151+
- 48000
152+
- 64000
153+
startTimeUnixNano: "1000000"
154+
sum: 815
155+
timeUnixNano: "1000000"
156+
metadata:
157+
- key: prometheus.type
158+
value:
159+
stringValue: histogram
160+
name: coredns_dns_request_size_bytes
161+
- description: Histogram of the time each request took.
162+
histogram:
163+
aggregationTemporality: 2
164+
dataPoints:
165+
- attributes:
166+
- key: rcode
167+
value:
168+
stringValue: NOERROR
169+
- key: to
170+
value:
171+
stringValue: 192.168.65.254:53
172+
bucketCounts:
173+
- "0"
174+
- "0"
175+
- "0"
176+
- "1"
177+
- "1"
178+
- "0"
179+
- "0"
180+
- "0"
181+
- "0"
182+
- "0"
183+
- "0"
184+
- "0"
185+
- "0"
186+
- "0"
187+
- "0"
188+
- "0"
189+
- "0"
190+
count: "2"
191+
explicitBounds:
192+
- 0.00025
193+
- 0.0005
194+
- 0.001
195+
- 0.002
196+
- 0.004
197+
- 0.008
198+
- 0.016
199+
- 0.032
200+
- 0.064
201+
- 0.128
202+
- 0.256
203+
- 0.512
204+
- 1.024
205+
- 2.048
206+
- 4.096
207+
- 8.192
208+
startTimeUnixNano: "1000000"
209+
sum: 0.003795245
210+
timeUnixNano: "1000000"
211+
metadata:
212+
- key: prometheus.type
213+
value:
214+
stringValue: histogram
215+
name: coredns_forward_request_duration_seconds
216+
- description: Size of the returned response in bytes.
217+
histogram:
218+
aggregationTemporality: 2
219+
dataPoints:
220+
- attributes:
221+
- key: proto
222+
value:
223+
stringValue: udp
224+
- key: server
225+
value:
226+
stringValue: dns://:53
227+
- key: zone
228+
value:
229+
stringValue: .
230+
bucketCounts:
231+
- "0"
232+
- "5"
233+
- "8"
234+
- "0"
235+
- "0"
236+
- "0"
237+
- "0"
238+
- "0"
239+
- "0"
240+
- "0"
241+
- "0"
242+
- "0"
243+
- "0"
244+
- "0"
245+
- "0"
246+
count: "13"
247+
explicitBounds:
248+
- 0
249+
- 100
250+
- 200
251+
- 300
252+
- 400
253+
- 511
254+
- 1023
255+
- 2047
256+
- 4095
257+
- 8291
258+
- 16000
259+
- 32000
260+
- 48000
261+
- 64000
262+
startTimeUnixNano: "1000000"
263+
sum: 1547
264+
timeUnixNano: "1000000"
265+
metadata:
266+
- key: prometheus.type
267+
value:
268+
stringValue: histogram
269+
name: coredns_dns_response_size_bytes
270+
- description: Histogram of the time (in seconds) each request took.
271+
histogram:
272+
aggregationTemporality: 2
273+
dataPoints:
274+
- bucketCounts:
275+
- "0"
276+
- "61"
277+
- "0"
278+
- "0"
279+
- "0"
280+
- "0"
281+
count: "61"
282+
explicitBounds:
283+
- 0.00025
284+
- 0.0025
285+
- 0.025
286+
- 0.25
287+
- 2.5
288+
startTimeUnixNano: "1000000"
289+
sum: 0.051919034999999995
290+
timeUnixNano: "1000000"
291+
metadata:
292+
- key: prometheus.type
293+
value:
294+
stringValue: histogram
295+
name: coredns_health_request_duration_seconds
296+
scope:
297+
name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver
298+
version: v0.120.0

0 commit comments

Comments
 (0)