5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/scout_apm/serializers/payload_serializer.rb', line 5
def self.serialize(metadata, metrics, slow_transactions, jobs, slow_jobs)
if ScoutApm::Agent.instance.config.value("report_format") == 'json'
ScoutApm::Serializers::PayloadSerializerToJson.serialize(metadata, metrics, slow_transactions, jobs, slow_jobs)
else
metadata = metadata.dup
metadata.default = nil
metrics = metrics.dup
metrics.default = nil
Marshal.dump(:metadata => metadata,
:metrics => metrics,
:slow_transactions => slow_transactions,
:jobs => jobs,
:slow_jobs => slow_jobs)
end
end
|