Class: ManageEngine::Tracker::RootTracker

Inherits:
DefaultTracker show all
Defined in:
lib/agent/trackers/root_tracker.rb

Instance Attribute Summary collapse

Attributes inherited from DefaultTracker

#child, #endtime, #error, #name, #sibling, #starttime

Instance Method Summary collapse

Methods inherited from DefaultTracker

#==, #duration, #error?, #finish, #hash, #initialize, #setError, #setName, #to_s

Constructor Details

This class inherits a constructor from ManageEngine::Tracker::DefaultTracker

Instance Attribute Details

#statusObject

Returns the value of attribute status.



7
8
9
# File 'lib/agent/trackers/root_tracker.rb', line 7

def status
  @status
end

#txnTypeObject

Returns the value of attribute txnType.



7
8
9
# File 'lib/agent/trackers/root_tracker.rb', line 7

def txnType
  @txnType
end

#urlObject

Returns the value of attribute url.



7
8
9
# File 'lib/agent/trackers/root_tracker.rb', line 7

def url
  @url
end

Instance Method Details

#addAdditionalInfo(param) ⇒ Object



51
52
53
# File 'lib/agent/trackers/root_tracker.rb', line 51

def addAdditionalInfo param
  @params = param
end

#addCustomParam(key, value) ⇒ Object



44
45
46
47
48
49
# File 'lib/agent/trackers/root_tracker.rb', line 44

def addCustomParam key, value
  if (@params == nil)
    @params = Hash.new
  end
  @params[key] = value
end

#getAdditionalInfoObject



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/agent/trackers/root_tracker.rb', line 55

def getAdditionalInfo
  info = super
  if (@http_method != nil && @queryString != nil && @status != nil)
    if (info == nil)
      info = Hash.new
    end
    info["http_method_name"] = @http_method
    info["http_query_str"] = @queryString
    info["httpcode"] = @status
  end
  if (@params != nil)
    if (info == nil)
      info = Hash.new
    end
    info["custom_params"] = @params
  end
  info
end

#getTxnNameObject



13
14
15
# File 'lib/agent/trackers/root_tracker.rb', line 13

def getTxnName
  ManageEngine::APMObjectHolder.instance.constants.mf_transaction + getTxnType() + ManageEngine::APMObjectHolder.instance.constants.mf_separator + @url
end

#getTxnTypeObject



21
22
23
24
25
26
# File 'lib/agent/trackers/root_tracker.rb', line 21

def getTxnType
  if (@txnType == nil)
    @txnType = ManageEngine::APMObjectHolder.instance.constants.mf_http
  end
  @txnType
end

#http_method(method) ⇒ Object



28
29
30
# File 'lib/agent/trackers/root_tracker.rb', line 28

def http_method(method)
  @http_method = method
end

#http_params(params) ⇒ Object



32
33
34
# File 'lib/agent/trackers/root_tracker.rb', line 32

def http_params(params)
  @http_params = params
end

#queryString(querystring) ⇒ Object



36
37
38
# File 'lib/agent/trackers/root_tracker.rb', line 36

def queryString(querystring)
  @queryString = querystring
end

#setStatus(httpcode) ⇒ Object



40
41
42
# File 'lib/agent/trackers/root_tracker.rb', line 40

def setStatus(httpcode)
  @status = httpcode
end

#setTxnType(type) ⇒ Object



17
18
19
# File 'lib/agent/trackers/root_tracker.rb', line 17

def setTxnType(type)
  @txnType=type
end