Class: OCI::ApmConfig::Models::Apdex
- Inherits:
-
Object
- Object
- OCI::ApmConfig::Models::Apdex
- Defined in:
- lib/oci/apm_config/models/apdex.rb
Overview
An Apdex configuration rule. The Apdex Score is computed based on how the response time of a span compares to two predefined threshold values. The first threshold defines the maximum response time that can still be considered satisfactory for the end user. The second one defines the maximum response time that can be considered tolerable. All times larger than that will be considered frustrating for the end user. An Apdex configuration rule works by selecting a subset of spans based on a filter expression and applying the two threshold comparisons to compute a score for each of the selected spans. The rule has a property "isApplyToErrorSpans" that controls whether or not to compute the Apdex for spans that have have been marked as errors. If this property is set to true, then error spans will have their Apdex score computed the same as non-error ones. If set to false, then computation for error spans will be skipped, and the score will be set to "frustrating" regardless of the configured thresholds. The default is "false". The property "isEnabled" controls whether an Apdex score is computed for the spans. Can be used to disable Apdex scores for certain spans. The default is "true". The property "priority" is used to define the importance of the rule when it’s part of a rule set. Lower values indicate a higher priority. Rules with higher priorities will be evaluated first in the rule set. The priority of the rules must be unique within a rule set.
Instance Attribute Summary collapse
-
#display_name ⇒ String
A user-friendly name that provides a short description this rule.
-
#filter_text ⇒ String
[Required] The string that defines the Span Filter expression.
-
#is_apply_to_error_spans ⇒ BOOLEAN
If true, the rule will compute the actual Apdex score for spans that have been marked as errors.
-
#is_enabled ⇒ BOOLEAN
Specifies if the Apdex rule will be computed for spans matching the rule.
-
#priority ⇒ Integer
[Required] The priority controls the order in which multiple rules in a rule set are applied.
-
#satisfied_response_time ⇒ Integer
The maximum response time in milliseconds that will be considered satisfactory for the end user.
-
#tolerating_response_time ⇒ Integer
The maximum response time in milliseconds that will be considered tolerable for the end user.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Apdex
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ Apdex
Initializes the object
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/oci/apm_config/models/apdex.rb', line 110 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.filter_text = attributes[:'filterText'] if attributes[:'filterText'] raise 'You cannot provide both :filterText and :filter_text' if attributes.key?(:'filterText') && attributes.key?(:'filter_text') self.filter_text = attributes[:'filter_text'] if attributes[:'filter_text'] self.priority = attributes[:'priority'] if attributes[:'priority'] self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? self.is_enabled = true if is_enabled.nil? && !attributes.key?(:'isEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.is_enabled = true if is_enabled.nil? && !attributes.key?(:'isEnabled') && !attributes.key?(:'is_enabled') # rubocop:disable Style/StringLiterals self.satisfied_response_time = attributes[:'satisfiedResponseTime'] if attributes[:'satisfiedResponseTime'] raise 'You cannot provide both :satisfiedResponseTime and :satisfied_response_time' if attributes.key?(:'satisfiedResponseTime') && attributes.key?(:'satisfied_response_time') self.satisfied_response_time = attributes[:'satisfied_response_time'] if attributes[:'satisfied_response_time'] self. = attributes[:'toleratingResponseTime'] if attributes[:'toleratingResponseTime'] raise 'You cannot provide both :toleratingResponseTime and :tolerating_response_time' if attributes.key?(:'toleratingResponseTime') && attributes.key?(:'tolerating_response_time') self. = attributes[:'tolerating_response_time'] if attributes[:'tolerating_response_time'] self.is_apply_to_error_spans = attributes[:'isApplyToErrorSpans'] unless attributes[:'isApplyToErrorSpans'].nil? self.is_apply_to_error_spans = false if is_apply_to_error_spans.nil? && !attributes.key?(:'isApplyToErrorSpans') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isApplyToErrorSpans and :is_apply_to_error_spans' if attributes.key?(:'isApplyToErrorSpans') && attributes.key?(:'is_apply_to_error_spans') self.is_apply_to_error_spans = attributes[:'is_apply_to_error_spans'] unless attributes[:'is_apply_to_error_spans'].nil? self.is_apply_to_error_spans = false if is_apply_to_error_spans.nil? && !attributes.key?(:'isApplyToErrorSpans') && !attributes.key?(:'is_apply_to_error_spans') # rubocop:disable Style/StringLiterals self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] end |
Instance Attribute Details
#display_name ⇒ String
A user-friendly name that provides a short description this rule.
65 66 67 |
# File 'lib/oci/apm_config/models/apdex.rb', line 65 def display_name @display_name end |
#filter_text ⇒ String
[Required] The string that defines the Span Filter expression.
29 30 31 |
# File 'lib/oci/apm_config/models/apdex.rb', line 29 def filter_text @filter_text end |
#is_apply_to_error_spans ⇒ BOOLEAN
If true, the rule will compute the actual Apdex score for spans that have been marked as errors. If false, the rule will always set the Apdex for error spans to frustrating, regardless of the configured thresholds. Default is false.
61 62 63 |
# File 'lib/oci/apm_config/models/apdex.rb', line 61 def is_apply_to_error_spans @is_apply_to_error_spans end |
#is_enabled ⇒ BOOLEAN
Specifies if the Apdex rule will be computed for spans matching the rule. Can be used to make sure certain spans don’t get an Apdex score. The default is "true".
42 43 44 |
# File 'lib/oci/apm_config/models/apdex.rb', line 42 def is_enabled @is_enabled end |
#priority ⇒ Integer
[Required] The priority controls the order in which multiple rules in a rule set are applied. Lower values indicate higher priorities. Rules with higher priority are applied first, and once a match is found, the rest of the rules are ignored. Rules within the same rule set cannot have the same priority.
36 37 38 |
# File 'lib/oci/apm_config/models/apdex.rb', line 36 def priority @priority end |
#satisfied_response_time ⇒ Integer
The maximum response time in milliseconds that will be considered satisfactory for the end user.
47 48 49 |
# File 'lib/oci/apm_config/models/apdex.rb', line 47 def satisfied_response_time @satisfied_response_time end |
#tolerating_response_time ⇒ Integer
The maximum response time in milliseconds that will be considered tolerable for the end user. Response times beyond this threshold will be considered frustrating. This value cannot be lower than "satisfiedResponseTime".
54 55 56 |
# File 'lib/oci/apm_config/models/apdex.rb', line 54 def end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/oci/apm_config/models/apdex.rb', line 68 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'filter_text': :'filterText', 'priority': :'priority', 'is_enabled': :'isEnabled', 'satisfied_response_time': :'satisfiedResponseTime', 'tolerating_response_time': :'toleratingResponseTime', 'is_apply_to_error_spans': :'isApplyToErrorSpans', 'display_name': :'displayName' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/oci/apm_config/models/apdex.rb', line 83 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'filter_text': :'String', 'priority': :'Integer', 'is_enabled': :'BOOLEAN', 'satisfied_response_time': :'Integer', 'tolerating_response_time': :'Integer', 'is_apply_to_error_spans': :'BOOLEAN', 'display_name': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/oci/apm_config/models/apdex.rb', line 166 def ==(other) return true if equal?(other) self.class == other.class && filter_text == other.filter_text && priority == other.priority && is_enabled == other.is_enabled && satisfied_response_time == other.satisfied_response_time && == other. && is_apply_to_error_spans == other.is_apply_to_error_spans && display_name == other.display_name end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/oci/apm_config/models/apdex.rb', line 202 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
182 183 184 |
# File 'lib/oci/apm_config/models/apdex.rb', line 182 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
191 192 193 |
# File 'lib/oci/apm_config/models/apdex.rb', line 191 def hash [filter_text, priority, is_enabled, satisfied_response_time, , is_apply_to_error_spans, display_name].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
235 236 237 238 239 240 241 242 243 244 |
# File 'lib/oci/apm_config/models/apdex.rb', line 235 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
229 230 231 |
# File 'lib/oci/apm_config/models/apdex.rb', line 229 def to_s to_hash.to_s end |