| Module | NewRelic::Agent::StatsEngine::MetricStats |
| In: |
lib/new_relic/agent/stats_engine/metric_stats.rb
|
Handles methods related to actual Metric collection @api public
| SCOPE_PLACEHOLDER | = | '__SCOPE__'.freeze |
This method is deprecated and not thread safe, and should not be used by any new client code. Use NewRelic::Agent.record_metric instead.
If scoped_metric_only is true, only a scoped metric is created (used by rendering metrics which by definition are per controller only) Leaving second, unused parameter for compatibility
@api public @deprecated Use {::NewRelic::Agent.record_metric} instead.
This method is deprecated and not thread safe, and should not be used by any new client code.
Lookup the Stats object for a given unscoped metric, returning a new Stats object if one did not exist previously.
@api public @deprecated Use {::NewRelic::Agent.record_metric} instead.
Renamed to reset!, here for backwards compatibility with 3rd-party gems (though this really isn‘t part of the public API). @deprecated
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).
@api private
Helper for recording a straight value into the count
Update the unscoped metrics given in metric_names. metric_names may be either a single name, or an array of names.
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.
There are four ways to use this method:
If this method is called during a transaction, the metrics will be attached to the Transaction, and not merged into the global set until the end of the transaction.
Otherwise, the metrics will be recorded directly into the global set of metrics, under a lock.
@api private