Method: NewRelic::Agent::StatsEngine#tl_record_scoped_and_unscoped_metrics
- Defined in:
- lib/new_relic/agent/stats_engine.rb
permalink #tl_record_scoped_and_unscoped_metrics(scoped_metric, summary_metrics = nil, value = nil, aux = nil, &blk) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Like tl_record_unscoped_metrics, but records a scoped metric as well.
This is an internal method, subject to change at any time. Client apps and gems should use the public API (NewRelic::Agent.record_metric) instead.
The given scoped_metric will be recoded as both a scoped and an unscoped metric. The summary_metrics will be recorded as unscoped metrics only.
If called during a transaction, all metrics will be attached to the Transaction, and not merged into the global set of metrics until the end of the transaction.
If called outside of a transaction, only the unscoped metrics will be recorded, directly into the global set of metrics (under a lock).
99 100 101 102 |
# File 'lib/new_relic/agent/stats_engine.rb', line 99 def tl_record_scoped_and_unscoped_metrics(scoped_metric, summary_metrics = nil, value = nil, aux = nil, &blk) state = NewRelic::Agent::Tracer.state record_scoped_and_unscoped_metrics(state, scoped_metric, summary_metrics, value, aux, &blk) end |