Sha256: 037385a26797e4ea59e48d19cc63794b301bf1c5d0149ff5fbc16e6435fb41a8
Contents?: true
Size: 780 Bytes
Versions: 39
Compression:
Stored size: 780 Bytes
Contents
# encoding: utf-8 require 'base64' require 'zlib' module OneApm module Support module Encoders module Identity def self.encode(data, opts=nil) data end end module Compressed def self.encode(data, opts=nil) Zlib::Deflate.deflate(data, Zlib::DEFAULT_COMPRESSION) end end module Base64CompressedJSON 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 end end end end
Version data entries
39 entries across 39 versions & 1 rubygems