|
23 | 23 | from pytest import mark |
24 | 24 |
|
25 | 25 | from opentelemetry.instrumentation._semconv import ( |
| 26 | + HTTP_DURATION_HISTOGRAM_BUCKETS_NEW, |
26 | 27 | OTEL_SEMCONV_STABILITY_OPT_IN, |
27 | 28 | _OpenTelemetrySemanticConventionStability, |
28 | 29 | ) |
@@ -76,10 +77,17 @@ def tearDown(self): |
76 | 77 | httpretty.disable() |
77 | 78 |
|
78 | 79 | # Return Sequence with one histogram |
79 | | - def create_histogram_data_points(self, sum_data_point, attributes): |
| 80 | + def create_histogram_data_points( |
| 81 | + self, sum_data_point, attributes, explicit_bounds=None |
| 82 | + ): |
80 | 83 | return [ |
81 | 84 | self.create_histogram_data_point( |
82 | | - sum_data_point, 1, sum_data_point, sum_data_point, attributes |
| 85 | + sum_data_point, |
| 86 | + 1, |
| 87 | + sum_data_point, |
| 88 | + sum_data_point, |
| 89 | + attributes, |
| 90 | + explicit_bounds=explicit_bounds, |
83 | 91 | ) |
84 | 92 | ] |
85 | 93 |
|
@@ -176,6 +184,7 @@ def test_basic_metric_new_semconv(self): |
176 | 184 | "http.request.method": "GET", |
177 | 185 | "network.protocol.version": "1.1", |
178 | 186 | }, |
| 187 | + explicit_bounds=HTTP_DURATION_HISTOGRAM_BUCKETS_NEW, |
179 | 188 | ), |
180 | 189 | est_value_delta=40, |
181 | 190 | ) |
@@ -295,6 +304,7 @@ def test_basic_metric_both_semconv(self): |
295 | 304 | "http.request.method": "GET", |
296 | 305 | "network.protocol.version": "1.1", |
297 | 306 | }, |
| 307 | + explicit_bounds=HTTP_DURATION_HISTOGRAM_BUCKETS_NEW, |
298 | 308 | ), |
299 | 309 | est_value_delta=40, |
300 | 310 | ) |
|
0 commit comments