def assign_agent_attributes
default_destinations = AttributeFilter::DST_TRANSACTION_TRACER |
AttributeFilter::DST_TRANSACTION_EVENTS |
AttributeFilter::DST_ERROR_COLLECTOR
if http_response_code
add_agent_attribute(:httpResponseCode, http_response_code.to_s, default_destinations)
end
if response_content_length
add_agent_attribute('response.headers.contentLength''response.headers.contentLength', response_content_length.to_i, default_destinations)
end
if response_content_type
add_agent_attribute('response.headers.contentType''response.headers.contentType', response_content_type, default_destinations)
end
if @request_attributes
@request_attributes.assign_agent_attributes self
end
display_host = Agent.config['process_host.display_name''process_host.display_name']
unless display_host == NewRelic::Agent::Hostname.get
add_agent_attribute('host.displayName''host.displayName', display_host, default_destinations)
end
end