Module: OneApm::Support::Encoders::Base64CompressedJSON
- Defined in:
- lib/one_apm/support/encoders.rb
Class Method Summary collapse
Class Method Details
.encode(data, opts = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/one_apm/support/encoders.rb', line 22 def self.encode(data, opts={}) normalize_encodings = if opts[:skip_normalization] false else OneApm::Manager.config[:normalize_json_string_encodings] end json = ::OneApm::JSONWrapper.dump(data, :normalize => normalize_encodings) Base64.encode64(Compressed.encode(json)) end |