Get the sql of a preparedstatement in span details

**Kibana version **:7.6

**Elasticsearch version **:7.6

APM Server version:7.6

**APM Agent language and version **: go 1.7.2

how can I get the real sql query in span detail

my code :

db, err := apmsql.Open("mysql", dataSourceName)

kibana apm trace mysql span details

select  *   from call_staff where id = ?

I want the real Sql like

select  *   from call_staff where id = 1

Hi @yangfeng, welcome to the forum!

We do not capture bind variables by design, as they might contain sensitive information (passwords, credit card numbers, etc.)

There is an open issue for discussing this feature, which we would want to align across the different agents: I suggest adding a :+1: to the issue, and subscribing for updates.

1 Like

ok.thank you

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.