Skip to content

Commit ff8df88

Browse files
committed
rename buckets variable
Signed-off-by: emdneto <[email protected]>
1 parent fd74a25 commit ff8df88

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def response_hook(span, request_obj, response):
103103
from requests.structures import CaseInsensitiveDict
104104

105105
from opentelemetry.instrumentation._semconv import (
106-
DURATION_HISTOGRAM_EXPLICIT_BOUNDS_NEW,
107-
DURATION_HISTOGRAM_EXPLICIT_BOUNDS_OLD,
106+
HTTP_DURATION_HISTOGRAM_BUCKETS_NEW,
107+
HTTP_DURATION_HISTOGRAM_BUCKETS_OLD,
108108
_client_duration_attrs_new,
109109
_client_duration_attrs_old,
110110
_filter_semconv_duration_attrs,
@@ -460,7 +460,7 @@ def _instrument(self, **kwargs: Any):
460460
unit="ms",
461461
description="measures the duration of the outbound HTTP request",
462462
explicit_bucket_boundaries_advisory=duration_histogram_boundaries
463-
or DURATION_HISTOGRAM_EXPLICIT_BOUNDS_OLD,
463+
or HTTP_DURATION_HISTOGRAM_BUCKETS_OLD,
464464
)
465465
duration_histogram_new = None
466466
if _report_new(semconv_opt_in_mode):
@@ -469,7 +469,7 @@ def _instrument(self, **kwargs: Any):
469469
unit="s",
470470
description="Duration of HTTP client requests.",
471471
explicit_bucket_boundaries_advisory=duration_histogram_boundaries
472-
or DURATION_HISTOGRAM_EXPLICIT_BOUNDS_NEW,
472+
or HTTP_DURATION_HISTOGRAM_BUCKETS_NEW,
473473
)
474474
_instrument(
475475
tracer,

instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import opentelemetry.instrumentation.requests
2424
from opentelemetry import trace
2525
from opentelemetry.instrumentation._semconv import (
26-
DURATION_HISTOGRAM_EXPLICIT_BOUNDS_NEW,
27-
DURATION_HISTOGRAM_EXPLICIT_BOUNDS_OLD,
26+
HTTP_DURATION_HISTOGRAM_BUCKETS_NEW,
27+
HTTP_DURATION_HISTOGRAM_BUCKETS_OLD,
2828
OTEL_SEMCONV_STABILITY_OPT_IN,
2929
_OpenTelemetrySemanticConventionStability,
3030
)
@@ -768,7 +768,7 @@ def test_basic_metric_success(self):
768768
for data_point in metric.data.data_points:
769769
self.assertEqual(
770770
data_point.explicit_bounds,
771-
DURATION_HISTOGRAM_EXPLICIT_BOUNDS_OLD,
771+
HTTP_DURATION_HISTOGRAM_BUCKETS_OLD,
772772
)
773773
self.assertDictEqual(
774774
expected_attributes, dict(data_point.attributes)
@@ -798,7 +798,7 @@ def test_basic_metric_new_semconv(self):
798798
for data_point in metric.data.data_points:
799799
self.assertEqual(
800800
data_point.explicit_bounds,
801-
DURATION_HISTOGRAM_EXPLICIT_BOUNDS_NEW,
801+
HTTP_DURATION_HISTOGRAM_BUCKETS_NEW,
802802
)
803803
self.assertDictEqual(
804804
expected_attributes, dict(data_point.attributes)

opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from opentelemetry.trace.status import Status, StatusCode
4949

5050
# Values defined in milliseconds
51-
DURATION_HISTOGRAM_EXPLICIT_BOUNDS_OLD = (
51+
HTTP_DURATION_HISTOGRAM_BUCKETS_OLD = (
5252
0.0,
5353
5.0,
5454
10.0,
@@ -67,7 +67,7 @@
6767
)
6868

6969
# Values defined in seconds
70-
DURATION_HISTOGRAM_EXPLICIT_BOUNDS_NEW = (
70+
HTTP_DURATION_HISTOGRAM_BUCKETS_NEW = (
7171
0.005,
7272
0.01,
7373
0.025,

0 commit comments

Comments
 (0)