Module: Datadog::Encoding::JSONEncoder

Extended by:
Encoder
Defined in:
lib/ddtrace/encoding.rb

Overview

Encoder for the JSON format

Constant Summary collapse

CONTENT_TYPE =
'application/json'.freeze

Class Method Summary collapse

Methods included from Encoder

encode_traces

Class Method Details

.content_typeObject



39
40
41
# File 'lib/ddtrace/encoding.rb', line 39

def content_type
  CONTENT_TYPE
end

.encode(obj) ⇒ Object



43
44
45
# File 'lib/ddtrace/encoding.rb', line 43

def encode(obj)
  JSON.dump(obj)
end