Skip to content

Commit bd109e2

Browse files
stolleroshadchin
authored andcommitted
fix(requests): Fix wrong time unit for duration histogram (open-telemetry#2553)
1 parent c39d3d0 commit bd109e2

File tree

2 files changed

+3
-4
lines changed
  • instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests

2 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5858
([#2524](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2524))
5959
- `opentelemetry-instrumentation-asyncio` Check for __name__ attribute in the coroutine
6060
([#2521](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2521))
61+
- `opentelemetry-instrumentation-requests` Fix wrong time unit for duration histogram
62+
([#2553](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2553))
6163
- `opentelemetry-util-http` Preserve brackets around literal IPv6 hosts ([#2552](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2552))
6264

63-
6465
## Version 1.24.0/0.45b0 (2024-03-28)
6566

6667
### Added

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ def get_or_create_headers():
229229
exception = exc
230230
result = getattr(exc, "response", None)
231231
finally:
232-
elapsed_time = max(
233-
round((default_timer() - start_time) * 1000), 0
234-
)
232+
elapsed_time = max(default_timer() - start_time, 0)
235233

236234
if isinstance(result, Response):
237235
span_attributes = {}

0 commit comments

Comments
 (0)