Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tammy-baylis-swi committed Dec 19, 2024
1 parent 0829a79 commit 1a515a1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -552,19 +552,20 @@ def traced_execution(
if span.is_recording():
if args and self._commenter_enabled:
if self._enable_attribute_commenter:
# sqlcomment in query and span attribute
# sqlcomment is added to executed query and db.statement span attribute
args = self._update_args_with_added_sql_comment(
args, cursor
)
self._populate_span(span, cursor, *args)
else:
# sqlcomment in query only
# sqlcomment is only added to executed query
# so db.statement is set before add_sql_comment
self._populate_span(span, cursor, *args)
args = self._update_args_with_added_sql_comment(
args, cursor
)
else:
# no sqlcomment
# no sqlcomment anywhere
self._populate_span(span, cursor, *args)
return query_method(*args, **kwargs)

Expand Down

0 comments on commit 1a515a1

Please sign in to comment.