Commit 7c3c32b
Samuel Shen
[BugFix] Fix test_l2 crash on HistogramDataPoint without .value
_read_counters() iterates all metrics from the InMemoryMetricReader,
not just counters. When another library registers a histogram on the
same MeterProvider, the reader returns HistogramDataPoint objects
which lack .value (they have .sum/.count instead). Guard with hasattr.
Signed-off-by: Samuel Shen <slshen@uchciago.edu>1 parent 65df38f commit 7c3c32b
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
0 commit comments