I’ve implemented the sqlcommenter extension with our db layer.
Everything seems to be working, analyzing the queries sent to the database I can see the /traceparent=xxx/ comments being added.
However, when I look at the Query Insights “End to End” view I am unable to see the linked traces.
If I search by traceid in the Trace viewer I’m able to see my traces, yet for some reason Query Insights dont seem to “connect” to the application traces.
I was able to see tags show up on queries so thats definitely working (driver name etc)
Any tips will be appreciated.. perhaps I need to enable something in our project to link Query traces to Application Traces.
If you or other users need to view the query plan or perform end-to-end tracing, you need specific IAM permissions to do so. You can create a custom role and add the necessary IAM permissions to it. Then, you can add this role to each user account that will use Query Insights to troubleshoot an issue. See Create a custom role.
The custom role needs to have the following IAM permission: cloudtrace.traces.get
As you can see from the screenshot, the traceparent= is appended to the query. I would expect that the trace view would therefore allow me to expand pg.query:contra (the highlighted row) to view trace of the query as it was executed by AlloyDB.