Class: DatadogAPIClient::V1::LogsStringBuilderProcessor
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::LogsStringBuilderProcessor
- Defined in:
- lib/datadog_api_client/v1/models/logs_string_builder_processor.rb
Overview
Use the string builder processor to add a new attribute (without spaces or special characters) to a log with the result of the provided template. This enables aggregation of different attributes or raw strings into a single attribute. The template is defined by both raw text and blocks with the syntax ‘%attribute_path`. Notes: - The processor only accepts attributes with values or an array of values in the blocks. - If an attribute cannot be used (object or array of object), it is replaced by an empty string or the entire operation is skipped depending on your selection. - If the target attribute already exists, it is overwritten by the result of the template. - Results of the template cannot exceed 256 characters.
Instance Attribute Summary collapse
-
#is_enabled ⇒ Object
Whether or not the processor is enabled.
-
#is_replace_missing ⇒ Object
If true, it replaces all missing attributes of ‘template` by an empty string.
-
#name ⇒ Object
Name of the processor.
-
#target ⇒ Object
The name of the attribute that contains the result of the template.
-
#template ⇒ Object
A formula with one or more attributes and raw text.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ LogsStringBuilderProcessor
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ LogsStringBuilderProcessor
Initializes the object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/datadog_api_client/v1/models/logs_string_builder_processor.rb', line 84 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsStringBuilderProcessor` 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::LogsStringBuilderProcessor`. 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?(:'is_replace_missing') self.is_replace_missing = attributes[:'is_replace_missing'] else self.is_replace_missing = false end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'target') self.target = attributes[:'target'] end if attributes.key?(:'template') self.template = attributes[:'template'] end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = 'string-builder-processor' 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_string_builder_processor.rb', line 27 def is_enabled @is_enabled end |
#is_replace_missing ⇒ Object
If true, it replaces all missing attributes of ‘template` by an empty string. If `false` (default), skips the operation for missing attributes.
30 31 32 |
# File 'lib/datadog_api_client/v1/models/logs_string_builder_processor.rb', line 30 def is_replace_missing @is_replace_missing end |
#name ⇒ Object
Name of the processor.
33 34 35 |
# File 'lib/datadog_api_client/v1/models/logs_string_builder_processor.rb', line 33 def name @name end |
#target ⇒ Object
The name of the attribute that contains the result of the template.
36 37 38 |
# File 'lib/datadog_api_client/v1/models/logs_string_builder_processor.rb', line 36 def target @target end |
#template ⇒ Object
A formula with one or more attributes and raw text.
39 40 41 |
# File 'lib/datadog_api_client/v1/models/logs_string_builder_processor.rb', line 39 def template @template end |
#type ⇒ Object
Returns the value of attribute type.
41 42 43 |
# File 'lib/datadog_api_client/v1/models/logs_string_builder_processor.rb', line 41 def type @type end |