@@ -4,7 +4,7 @@ use opentelemetry_sdk::{
4
4
metrics:: {
5
5
data:: { self , Gauge , Histogram , Sum } ,
6
6
reader:: MetricReader ,
7
- InstrumentKind , ManualReader , MeterProviderBuilder , SdkMeterProvider ,
7
+ InstrumentKind , ManualReader , MeterProviderBuilder ,
8
8
} ,
9
9
} ;
10
10
@@ -27,9 +27,8 @@ async fn u64_counter_is_exported() {
27
27
28
28
tracing:: subscriber:: with_default ( subscriber, || {
29
29
tracing:: info!( monotonic_counter. hello_world = 1_u64 ) ;
30
+ exporter. export ( ) . unwrap ( ) ;
30
31
} ) ;
31
-
32
- exporter. export ( ) . unwrap ( ) ;
33
32
}
34
33
35
34
#[ tokio:: test]
@@ -43,9 +42,8 @@ async fn u64_counter_is_exported_i64_at_instrumentation_point() {
43
42
44
43
tracing:: subscriber:: with_default ( subscriber, || {
45
44
tracing:: info!( monotonic_counter. hello_world2 = 1_i64 ) ;
45
+ exporter. export ( ) . unwrap ( ) ;
46
46
} ) ;
47
-
48
- exporter. export ( ) . unwrap ( ) ;
49
47
}
50
48
51
49
#[ tokio:: test]
@@ -59,9 +57,8 @@ async fn f64_counter_is_exported() {
59
57
60
58
tracing:: subscriber:: with_default ( subscriber, || {
61
59
tracing:: info!( monotonic_counter. float_hello_world = 1.000000123_f64 ) ;
60
+ exporter. export ( ) . unwrap ( ) ;
62
61
} ) ;
63
-
64
- exporter. export ( ) . unwrap ( ) ;
65
62
}
66
63
67
64
#[ tokio:: test]
@@ -75,9 +72,8 @@ async fn i64_up_down_counter_is_exported() {
75
72
76
73
tracing:: subscriber:: with_default ( subscriber, || {
77
74
tracing:: info!( counter. pebcak = -5_i64 ) ;
75
+ exporter. export ( ) . unwrap ( ) ;
78
76
} ) ;
79
-
80
- exporter. export ( ) . unwrap ( ) ;
81
77
}
82
78
83
79
#[ tokio:: test]
@@ -91,9 +87,8 @@ async fn i64_up_down_counter_is_exported_u64_at_instrumentation_point() {
91
87
92
88
tracing:: subscriber:: with_default ( subscriber, || {
93
89
tracing:: info!( counter. pebcak2 = 5_u64 ) ;
90
+ exporter. export ( ) . unwrap ( ) ;
94
91
} ) ;
95
-
96
- exporter. export ( ) . unwrap ( ) ;
97
92
}
98
93
99
94
#[ tokio:: test]
@@ -107,9 +102,8 @@ async fn f64_up_down_counter_is_exported() {
107
102
108
103
tracing:: subscriber:: with_default ( subscriber, || {
109
104
tracing:: info!( counter. pebcak_blah = 99.123_f64 ) ;
105
+ exporter. export ( ) . unwrap ( ) ;
110
106
} ) ;
111
-
112
- exporter. export ( ) . unwrap ( ) ;
113
107
}
114
108
115
109
#[ tokio:: test]
@@ -120,9 +114,8 @@ async fn u64_gauge_is_exported() {
120
114
tracing:: subscriber:: with_default ( subscriber, || {
121
115
tracing:: info!( gauge. gygygy = 1_u64 ) ;
122
116
tracing:: info!( gauge. gygygy = 2_u64 ) ;
117
+ exporter. export ( ) . unwrap ( ) ;
123
118
} ) ;
124
-
125
- exporter. export ( ) . unwrap ( ) ;
126
119
}
127
120
128
121
#[ tokio:: test]
@@ -133,9 +126,8 @@ async fn f64_gauge_is_exported() {
133
126
tracing:: subscriber:: with_default ( subscriber, || {
134
127
tracing:: info!( gauge. huitt = 1_f64 ) ;
135
128
tracing:: info!( gauge. huitt = 2_f64 ) ;
129
+ exporter. export ( ) . unwrap ( ) ;
136
130
} ) ;
137
-
138
- exporter. export ( ) . unwrap ( ) ;
139
131
}
140
132
141
133
#[ tokio:: test]
@@ -146,9 +138,8 @@ async fn i64_gauge_is_exported() {
146
138
tracing:: subscriber:: with_default ( subscriber, || {
147
139
tracing:: info!( gauge. samsagaz = 1_i64 ) ;
148
140
tracing:: info!( gauge. samsagaz = 2_i64 ) ;
141
+ exporter. export ( ) . unwrap ( ) ;
149
142
} ) ;
150
-
151
- exporter. export ( ) . unwrap ( ) ;
152
143
}
153
144
154
145
#[ tokio:: test]
@@ -162,9 +153,8 @@ async fn u64_histogram_is_exported() {
162
153
163
154
tracing:: subscriber:: with_default ( subscriber, || {
164
155
tracing:: info!( histogram. abcdefg = 9_u64 ) ;
156
+ exporter. export ( ) . unwrap ( ) ;
165
157
} ) ;
166
-
167
- exporter. export ( ) . unwrap ( ) ;
168
158
}
169
159
170
160
#[ tokio:: test]
@@ -178,9 +168,8 @@ async fn f64_histogram_is_exported() {
178
168
179
169
tracing:: subscriber:: with_default ( subscriber, || {
180
170
tracing:: info!( histogram. abcdefg_racecar = 777.0012_f64 ) ;
171
+ exporter. export ( ) . unwrap ( ) ;
181
172
} ) ;
182
-
183
- exporter. export ( ) . unwrap ( ) ;
184
173
}
185
174
186
175
#[ tokio:: test]
@@ -207,9 +196,8 @@ async fn u64_counter_with_attributes_is_exported() {
207
196
str_key_1 = "foo" ,
208
197
bool_key_1 = true ,
209
198
) ;
199
+ exporter. export ( ) . unwrap ( ) ;
210
200
} ) ;
211
-
212
- exporter. export ( ) . unwrap ( ) ;
213
201
}
214
202
215
203
#[ tokio:: test]
@@ -236,9 +224,8 @@ async fn f64_counter_with_attributes_is_exported() {
236
224
str_key_1 = "foo" ,
237
225
bool_key_1 = true ,
238
226
) ;
227
+ exporter. export ( ) . unwrap ( ) ;
239
228
} ) ;
240
-
241
- exporter. export ( ) . unwrap ( ) ;
242
229
}
243
230
244
231
#[ tokio:: test]
@@ -265,9 +252,8 @@ async fn i64_up_down_counter_with_attributes_is_exported() {
265
252
str_key_1 = "foo" ,
266
253
bool_key_1 = true ,
267
254
) ;
255
+ exporter. export ( ) . unwrap ( ) ;
268
256
} ) ;
269
-
270
- exporter. export ( ) . unwrap ( ) ;
271
257
}
272
258
273
259
#[ tokio:: test]
@@ -294,9 +280,8 @@ async fn f64_up_down_counter_with_attributes_is_exported() {
294
280
str_key_1 = "foo" ,
295
281
bool_key_1 = true ,
296
282
) ;
283
+ exporter. export ( ) . unwrap ( ) ;
297
284
} ) ;
298
-
299
- exporter. export ( ) . unwrap ( ) ;
300
285
}
301
286
302
287
#[ tokio:: test]
@@ -323,9 +308,8 @@ async fn f64_gauge_with_attributes_is_exported() {
323
308
str_key_1 = "foo" ,
324
309
bool_key_1 = true ,
325
310
) ;
311
+ exporter. export ( ) . unwrap ( ) ;
326
312
} ) ;
327
-
328
- exporter. export ( ) . unwrap ( ) ;
329
313
}
330
314
331
315
#[ tokio:: test]
@@ -352,9 +336,8 @@ async fn u64_gauge_with_attributes_is_exported() {
352
336
str_key_1 = "foo" ,
353
337
bool_key_1 = true ,
354
338
) ;
339
+ exporter. export ( ) . unwrap ( ) ;
355
340
} ) ;
356
-
357
- exporter. export ( ) . unwrap ( ) ;
358
341
}
359
342
360
343
#[ tokio:: test]
@@ -381,9 +364,8 @@ async fn i64_gauge_with_attributes_is_exported() {
381
364
str_key_1 = "foo" ,
382
365
bool_key_1 = true ,
383
366
) ;
367
+ exporter. export ( ) . unwrap ( ) ;
384
368
} ) ;
385
-
386
- exporter. export ( ) . unwrap ( ) ;
387
369
}
388
370
389
371
#[ tokio:: test]
@@ -410,9 +392,8 @@ async fn u64_histogram_with_attributes_is_exported() {
410
392
str_key_1 = "foo" ,
411
393
bool_key_1 = true ,
412
394
) ;
395
+ exporter. export ( ) . unwrap ( ) ;
413
396
} ) ;
414
-
415
- exporter. export ( ) . unwrap ( ) ;
416
397
}
417
398
418
399
#[ tokio:: test]
@@ -439,9 +420,8 @@ async fn f64_histogram_with_attributes_is_exported() {
439
420
str_key_1 = "foo" ,
440
421
bool_key_1 = true ,
441
422
) ;
423
+ exporter. export ( ) . unwrap ( ) ;
442
424
} ) ;
443
-
444
- exporter. export ( ) . unwrap ( ) ;
445
425
}
446
426
447
427
#[ tokio:: test]
@@ -468,9 +448,8 @@ async fn display_attribute_is_exported() {
468
448
monotonic_counter. hello_world = 1_u64 ,
469
449
display_key_1 = %display_attribute,
470
450
) ;
451
+ exporter. export ( ) . unwrap ( ) ;
471
452
} ) ;
472
-
473
- exporter. export ( ) . unwrap ( ) ;
474
453
}
475
454
476
455
#[ tokio:: test]
@@ -497,9 +476,8 @@ async fn debug_attribute_is_exported() {
497
476
monotonic_counter. hello_world = 1_u64 ,
498
477
debug_key_1 = ?debug_attribute,
499
478
) ;
479
+ exporter. export ( ) . unwrap ( ) ;
500
480
} ) ;
501
-
502
- exporter. export ( ) . unwrap ( ) ;
503
481
}
504
482
505
483
fn init_subscriber < T > (
@@ -522,7 +500,6 @@ fn init_subscriber<T>(
522
500
expected_value,
523
501
expected_attributes,
524
502
reader,
525
- _meter_provider : provider. clone ( ) ,
526
503
} ;
527
504
528
505
(
@@ -568,7 +545,6 @@ struct TestExporter<T> {
568
545
expected_value : T ,
569
546
expected_attributes : Option < Vec < KeyValue > > ,
570
547
reader : TestReader ,
571
- _meter_provider : SdkMeterProvider ,
572
548
}
573
549
574
550
trait AsAny {
0 commit comments