-
Notifications
You must be signed in to change notification settings - Fork 621
Description
Currently instumentation-pg tries to infer query type (SELECT/INSERT/UPDATE) from the sql text. This logic is not very robust as you can see on the screenshot. It just takes the first word of the query and adds it to span name. Even when operation is deduced successfully I personally do not find it very meaningful to have it in span name. When there are few queries it can provide some benefit by speeding up the navigation I find that most often I need to check each span with its attributes to find the one I am interested in.
So the proposal is to simplify the logic and generate the same span name for all the queries, like pg.query or something similar. With this instrumentation being one of the most used in our setup it may also provide the benefit of reducing allocations
For reference
#2029 (comment)
