Method: NewRelic::Agent::Datastores.notice_sql
- Defined in:
- lib/new_relic/agent/datastores.rb
.notice_sql(query, scoped_metric, elapsed) ⇒ Object
Note:
THERE ARE SECURITY CONCERNS WHEN CAPTURING QUERY TEXT! New Relic’s Transaction Tracing and Slow SQL features will attempt to apply obfuscation to the passed queries, but it is possible for a query format to be unsupported and result in exposing user information embedded within captured queries.
Wrapper for simplifying attaching SQL queries during a transaction.
If you are recording non-SQL data, please use notice_statement instead.
NewRelic::Agent::Datastores.notice_sql(query, metrics, elapsed)
162 163 164 165 166 167 168 169 |
# File 'lib/new_relic/agent/datastores.rb', line 162 def self.notice_sql(query, scoped_metric, elapsed) NewRelic::Agent.record_api_supportability_metric(:notice_sql) if (txn = Tracer.current_transaction) && (segment = txn.current_segment) && segment.respond_to?(:notice_sql) segment.notice_sql(query) end nil end |