Method: NewRelic::Agent::Transaction::ExternalRequestSegment#process_response_metadata
- Defined in:
- lib/new_relic/agent/transaction/external_request_segment.rb
#process_response_metadata(response_metadata) ⇒ Object
Process obfuscated String
sent from a called application that is also running a New Relic agent and save information in current transaction for inclusion in a trace. This String
is generated by get_response_metadata
on the receiving application.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/new_relic/agent/transaction/external_request_segment.rb', line 170 def () NewRelic::Agent.record_api_supportability_metric(:process_response_metadata) if transaction app_data = ::JSON.parse(obfuscator.deobfuscate())[APP_DATA_KEY] # validate cross app id # if Array === app_data and CrossAppTracing.trusted_valid_cross_app_id?(app_data[0]) @app_data = app_data update_segment_name else NewRelic::Agent.logger.error('error processing response metadata: invalid/non-trusted ID') end end nil rescue => e NewRelic::Agent.logger.error('error during process_response_metadata', e) end |