We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d76d7e commit 8390d6aCopy full SHA for 8390d6a
lib/stackify/metrics/metrics_sender.rb
@@ -14,11 +14,14 @@ def monitor_info aggr_metric
14
def upload_metrics aggr_metrics
15
return true if aggr_metrics.nil? || aggr_metrics.length == 0
16
current_time = Stackify::Utils.rounded_current_time
17
+ device_id = Stackify::EnvDetails.instance.auth_info['DeviceID']
18
if Stackify.authorized?
19
records = []
20
aggr_metrics.each_pair do |_key, metric|
21
next if metric.sent || metric.occurred_utc.to_i >= current_time.to_i
- records << Stackify::Metrics::MetricForSubmit.new(metric).to_h
22
+ record = Stackify::Metrics::MetricForSubmit.new(metric).to_h
23
+ record['ClientDeviceID'] = device_id if !device_id.nil?
24
+ records << record
25
metric.sent = true
26
end
27
if records.any?
0 commit comments