Skip to content

dbapi2 span does not include object name when calling a procedure #1937

@anderssonjohan

Description

@anderssonjohan

Is your feature request related to a problem? Please describe.

Aggregating metrics of stored procedures is not possible because the span name lacks the object name of the procedure being called.
Also, the span.action is only set to exec when a procedure is executed through callproc, not connection.execute etc.
Now it's set to query for EXECUTE statements, depending on the dbapi2 method used.

Describe the solution you'd like

  • Set span.action to the EXEC_ACTION constant for all EXEC/EXECUTE statements
  • Include the object name / procedure name in the span.name, such as EXECUTE sp_who instead of just EXECUTE

Describe alternatives you've considered

Custom spans can be used, but that duplicates the number of spans for each EXECUTE statement

Additional context

Example of current output:

Screenshot 2023-11-24 at 18 39 31

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions