newrelic / newrelic-java-agent

The New Relic Java agent
Apache License 2.0
201 stars 143 forks source link

SQL and DB.STATEMENT attributes in distributed traces #782

Open twcrone opened 2 years ago

twcrone commented 2 years ago

A individual has noticed the Java Agent's sql attribute is added to the root span but does not always contain the slowest query. There is a dashboard that shows slow queries and noticed that db.statement sometimes shows a query slower than that presented in sql.

The sql attribute is a supplementary attribute added by the Java agent.

Basically, why does sql not appear in db.statement, and why does db.statement have some queries that are slower than those shown in sql.

https://newrelic.atlassian.net/browse/GTSE-13832

(Migrate to Jira)

workato-integration[bot] commented 2 years ago

https://issues.newrelic.com/browse/NEWRELIC-4036