Method: NewRelic::Agent::DistributedTracePayload#text
- Defined in:
- lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb
permalink #text ⇒ String
Represent this payload as a raw JSON string.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb', line 125 def text result = { VERSION_KEY => version } result[DATA_KEY] = { PARENT_TYPE_KEY => parent_type, PARENT_ACCOUNT_ID_KEY => parent_account_id, PARENT_APP_KEY => parent_app_id, TX_KEY => transaction_id, TRACE_ID_KEY => trace_id, SAMPLED_KEY => sampled, PRIORITY_KEY => priority, TIMESTAMP_KEY => } result[DATA_KEY][ID_KEY] = id if id result[DATA_KEY][TRUSTED_ACCOUNT_KEY] = trusted_account_key if trusted_account_key JSON.dump(result) end |