class TingYun::Agent::Transaction::Attributes

Attributes

agent_attributes[RW]
custom_params[RW]
request_header[RW]
request_params[RW]
response_header[RW]
user_info[RW]

Public Class Methods

new() click to toggle source
# File lib/ting_yun/agent/transaction/attributes.rb, line 9
def initialize
  @agent_attributes  = {:httpStatus => 0} #defaul value
  @request_params = {}
  @custom_params = {:threadId => $$}
  @response_header = {}
  @request_header = {}
  @user_info = {}
end

Public Instance Methods

add_agent_attribute(key, value) click to toggle source

no longer to care about the value if nil or not

# File lib/ting_yun/agent/transaction/attributes.rb, line 19
def add_agent_attribute(key, value)
  @agent_attributes[key] = value
end
add_custom_params(key, value) click to toggle source
# File lib/ting_yun/agent/transaction/attributes.rb, line 27
def add_custom_params(key, value)
  @custom_params[key] = value
end
add_request_params(key, value) click to toggle source
# File lib/ting_yun/agent/transaction/attributes.rb, line 31
def add_request_params(key, value)
  @request_header[key] = value
end
add_user_info(key, value) click to toggle source
# File lib/ting_yun/agent/transaction/attributes.rb, line 39
def add_user_info(key, value)
  @user_info[key] = value
end
merge_request_header(hash) click to toggle source
# File lib/ting_yun/agent/transaction/attributes.rb, line 35
def merge_request_header(hash)
  @request_header.merge!(hash) if hash
end
merge_request_parameters(hash) click to toggle source
# File lib/ting_yun/agent/transaction/attributes.rb, line 23
def merge_request_parameters(hash)
  @request_params.merge!(hash) if hash
end