Skip to content

Instantly share code, notes, and snippets.

@JeffreyMFarley
Created June 23, 2023 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffreyMFarley/be9fd0d4e609c3787e4a14cd2c0ec426 to your computer and use it in GitHub Desktop.
Save JeffreyMFarley/be9fd0d4e609c3787e4a14cd2c0ec426 to your computer and use it in GitHub Desktop.
from scout_apm.core.tracked_request import TrackedRequest
def execute(self, sql, *args, **kwargs):
tracked_request = TrackedRequest.instance()
span = tracked_request.start_span(operation='SQL/Query')
span.tag("db.statement", sql)
self._inner.execute(sql, *args, **kwargs)
tracked_request.stop_span()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment