Commit f4f9a1c
authored
fix: Do not log error when there are no metrics to export (#1953)
* Fix debug logging when there are no metrics to export
When collected_metrics is empty, result_code was not getting set and so report_result would fail.
Reported by: @utay
Related to: #1947 and #1888
* use case statement
* do not log errors
* Favor modifier if usage when having a single-line body.1 parent 6f70825 commit f4f9a1c
File tree
2 files changed
+1
-29
lines changed- metrics_sdk
- lib/opentelemetry/sdk/metrics/export
- test/opentelemetry/sdk/metrics/export
2 files changed
+1
-29
lines changedLines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 133 | + | |
139 | 134 | | |
140 | 135 | | |
141 | 136 | | |
| |||
Lines changed: 0 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 36 | | |
60 | 37 | | |
61 | 38 | | |
| |||
0 commit comments