mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-01 09:13:23 +08:00
Fix span name for aiopg
This commit is contained in:
@ -101,9 +101,16 @@ class AsyncTracedCursor(TracedCursor):
|
||||
*args: typing.Tuple[typing.Any, typing.Any],
|
||||
**kwargs: typing.Dict[typing.Any, typing.Any]
|
||||
):
|
||||
name = ""
|
||||
if len(args) > 0 and args[0]:
|
||||
name = args[0]
|
||||
elif self._db_api_integration.database:
|
||||
name = self._db_api_integration.database
|
||||
else:
|
||||
name = self._db_api_integration.name
|
||||
|
||||
with self._db_api_integration.get_tracer().start_as_current_span(
|
||||
self._db_api_integration.name, kind=SpanKind.CLIENT
|
||||
name, kind=SpanKind.CLIENT
|
||||
) as span:
|
||||
self._populate_span(span, *args)
|
||||
try:
|
||||
|
Reference in New Issue
Block a user