File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4343 ([ #4119 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4119 ) )
4444- ` opentelemetry-instrumentation ` : add database stability attribute setters in ` _semconv ` utilities
4545 ([ #4108 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4108 ) )
46+ - ` opentelemetry-instrumentation-aiohttp-server ` : pass request attributes at span creation
47+ ([ #4118 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4118 ) )
4648- ` opentelemetry-instrumentation-tornado ` : Implement new semantic convention opt-in migration
4749 ([ #3993 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3993 ) )
4850- ` opentelemetry-instrumentation-tornado ` : pass request attributes at span creation
Original file line number Diff line number Diff line change @@ -468,13 +468,12 @@ async def _middleware(request, handler):
468468 span_name ,
469469 context = extract (request , getter = getter ),
470470 kind = trace .SpanKind .SERVER ,
471+ attributes = request_attrs ,
471472 ) as span :
472473 if span .is_recording ():
473- request_headers_attributes = (
474+ span . set_attributes (
474475 collect_request_headers_attributes (request )
475476 )
476- request_attrs .update (request_headers_attributes )
477- span .set_attributes (request_attrs )
478477 start = default_timer ()
479478 active_requests_counter .add (1 , active_requests_count_attrs )
480479 try :
You can’t perform that action at this time.
0 commit comments