Class: ManageEngine::Tracker::RootTracker

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

Instance Attribute Summary collapse

Attributes inherited from DefaultTracker

#children, #component, #endtime, #error, #name, #parent, #starttime

Instance Method Summary collapse

Methods inherited from DefaultTracker

#==, #duration, #error?, #finish, #getAdditionalInfo, #getTrace, #hash, #initialize, #setError, #setName, #setParent, #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



57
58
59
# File 'lib/agent/trackers/root_tracker.rb', line 57

def addAdditionalInfo param
  @params = param
end

#addCustomParam(key, value) ⇒ Object



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

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

#getStatusObject



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

def getStatus
  @status
end

#getTraceInfoObject



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/agent/trackers/root_tracker.rb', line 61

def getTraceInfo
  info = Hash.new
  if (@http_method != nil) #&& @queryString != nil && @status != nil
    info["http_method_name"] = @http_method
  end
  if (@queryString != nil)
    info["http_query_str"] = @queryString
    info["http_input_params"] = nil
  end
  if (@status != nil)
    info["httpcode"] = @status
  end
  if (@params != nil)
    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
39
40
# File 'lib/agent/trackers/root_tracker.rb', line 36

def queryString(querystring)
  if (!querystring.empty?)
    @queryString = querystring
  end
end

#setStatus(httpcode) ⇒ Object



42
43
44
# File 'lib/agent/trackers/root_tracker.rb', line 42

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