145
146
147
148
149
150
151
152
153
154
155
156
157
|
# File 'lib/new_relic/agent/new_relic_service.rb', line 145
def metric_data(stats_hash)
return NewRelic::Agent.agent.serverless_handler.metric_data(stats_hash) if NewRelic::Agent.agent.serverless?
timeslice_start = stats_hash.started_at
timeslice_end = stats_hash.harvested_at || Process.clock_gettime(Process::CLOCK_REALTIME)
metric_data_array = build_metric_data_array(stats_hash)
invoke_remote(
:metric_data,
[@agent_id, timeslice_start, timeslice_end, metric_data_array],
:item_count => metric_data_array.size
)
end
|