Class: DatadogAPIClient::V1::LogsAttributeRemapper
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::LogsAttributeRemapper
- Defined in:
- lib/datadog_api_client/v1/models/logs_attribute_remapper.rb
Overview
The remapper processor remaps any source attribute(s) or tag to another target attribute or tag. Constraints on the tag/attribute name are explained in the [Tag Best Practice documentation](docs.datadoghq.com/logs/guide/log-parsing-best-practice). Some additional constraints are applied as ‘:` or `,` are not allowed in the target tag/attribute name.
Instance Attribute Summary collapse
-
#is_enabled ⇒ Object
Whether or not the processor is enabled.
-
#name ⇒ Object
Name of the processor.
-
#override_on_conflict ⇒ Object
Override or not the target element if already set,.
-
#preserve_source ⇒ Object
Remove or preserve the remapped source element.
-
#source_type ⇒ Object
Defines if the sources are from log ‘attribute` or `tag`.
-
#sources ⇒ Object
Array of source attributes.
-
#target ⇒ Object
Final attribute or tag name to remap the sources to.
-
#target_format ⇒ Object
Returns the value of attribute target_format.
-
#target_type ⇒ Object
Defines if the final attribute or tag name is from log ‘attribute` or `tag`.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ LogsAttributeRemapper
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ LogsAttributeRemapper
Initializes the object
103 104 105 106 107 108 109 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 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 103 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsAttributeRemapper` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::LogsAttributeRemapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] else self.is_enabled = false end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'override_on_conflict') self.override_on_conflict = attributes[:'override_on_conflict'] else self.override_on_conflict = false end if attributes.key?(:'preserve_source') self.preserve_source = attributes[:'preserve_source'] else self.preserve_source = false end if attributes.key?(:'source_type') self.source_type = attributes[:'source_type'] else self.source_type = 'attribute' end if attributes.key?(:'sources') if (value = attributes[:'sources']).is_a?(Array) self.sources = value end end if attributes.key?(:'target') self.target = attributes[:'target'] end if attributes.key?(:'target_format') self.target_format = attributes[:'target_format'] end if attributes.key?(:'target_type') self.target_type = attributes[:'target_type'] else self.target_type = 'attribute' end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = 'attribute-remapper' end end |
Instance Attribute Details
#is_enabled ⇒ Object
Whether or not the processor is enabled.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 27 def is_enabled @is_enabled end |
#name ⇒ Object
Name of the processor.
30 31 32 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 30 def name @name end |
#override_on_conflict ⇒ Object
Override or not the target element if already set,
33 34 35 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 33 def override_on_conflict @override_on_conflict end |
#preserve_source ⇒ Object
Remove or preserve the remapped source element.
36 37 38 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 36 def preserve_source @preserve_source end |
#source_type ⇒ Object
Defines if the sources are from log ‘attribute` or `tag`.
39 40 41 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 39 def source_type @source_type end |
#sources ⇒ Object
Array of source attributes.
42 43 44 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 42 def sources @sources end |
#target ⇒ Object
Final attribute or tag name to remap the sources to.
45 46 47 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 45 def target @target end |
#target_format ⇒ Object
Returns the value of attribute target_format.
47 48 49 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 47 def target_format @target_format end |
#target_type ⇒ Object
Defines if the final attribute or tag name is from log ‘attribute` or `tag`.
50 51 52 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 50 def target_type @target_type end |
#type ⇒ Object
Returns the value of attribute type.
52 53 54 |
# File 'lib/datadog_api_client/v1/models/logs_attribute_remapper.rb', line 52 def type @type end |