File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
2121- Fix bug in Urllib instrumentation - add status code to span attributes only if the status code is not None.
2222 ([ #1430 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1430 ) )
23+ - ` opentelemetry-instrumentation-aiohttp-client ` Allow overriding of status in response hook.
24+ ([ #1394 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1394 ) )
2325- ` opentelemetry-instrumentation-pymysql ` Fix dbapi connection instrument wrapper has no _ sock member.
2426 ([ #1424 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424 ) )
2527- ` opentelemetry-instrumentation-dbapi ` Fix the check for the connection already being instrumented in instrument_connection().
Original file line number Diff line number Diff line change @@ -232,12 +232,13 @@ async def on_request_exception(
232232 if trace_config_ctx .span is None :
233233 return
234234
235- if callable (response_hook ):
236- response_hook (trace_config_ctx .span , params )
237-
238235 if trace_config_ctx .span .is_recording () and params .exception :
239236 trace_config_ctx .span .set_status (Status (StatusCode .ERROR ))
240237 trace_config_ctx .span .record_exception (params .exception )
238+
239+ if callable (response_hook ):
240+ response_hook (trace_config_ctx .span , params )
241+
241242 _end_trace (trace_config_ctx )
242243
243244 def _trace_config_ctx_factory (** kwargs ):
You can’t perform that action at this time.
0 commit comments