Skip to content

Commit b304292

Browse files
krnrYuri Lobanoff
authored andcommitted
pass exception
1 parent 1d5dfa3 commit b304292

File tree

1 file changed

+3
-3
lines changed
  • instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server

1 file changed

+3
-3
lines changed

instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,19 +238,19 @@ def _parse_active_request_count_attrs(req_attrs):
238238

239239

240240
def get_default_span_name(request: web.Request) -> str:
241-
"""Default implementation for get_default_span_details
241+
"""Returns the span name.
242242
Args:
243243
request: the request object itself.
244244
Returns:
245-
The span name.
245+
The canonical name of a resource if possible or just request path.
246246
"""
247247
path = request.path.strip()
248248
try:
249249
resource = request.match_info.route.resource
250250
if resource:
251251
path = resource.canonical
252252
except AttributeError:
253-
path = "unknown"
253+
pass
254254
return f"{request.method} {path}"
255255

256256

0 commit comments

Comments
 (0)