Class: DatadogAPIClient::V1::LogsArithmeticProcessor
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::LogsArithmeticProcessor
- Includes:
- BaseGenericModel
- Defined in:
- lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb
Overview
Use the Arithmetic Processor to add a new attribute (without spaces or special characters in the new attribute name) to a log with the result of the provided formula. This enables you to remap different time attributes with different units into a single attribute, or to compute operations on attributes within the same log.
The formula can use parentheses and the basic arithmetic operators -, ‘+`, `*`, /.
By default, the calculation is skipped if an attribute is missing. Select “Replace missing attribute by 0” to automatically populate missing attribute values with 0 to ensure that the calculation is done. An attribute is missing if it is not found in the log attributes, or if it cannot be converted to a number.
Notes:
-
The operator
-needs to be space split in the formula as it can also be contained in attribute names. -
If the target attribute already exists, it is overwritten by the result of the formula.
-
Results are rounded up to the 9th decimal. For example, if the result of the formula is
0.1234567891, the actual value stored for the attribute is0.123456789. -
If you need to scale a unit of measure, see [Scale Filter](docs.datadoghq.com/logs/log_configuration/parsing/?tab=filter#matcher-and-filter).
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Arithmetic operation between one or more log attributes.
-
#is_enabled ⇒ Object
Whether or not the processor is enabled.
-
#is_replace_missing ⇒ Object
If
true, it replaces all missing attributes of expression by0,falseskip the operation if an attribute is missing. -
#name ⇒ Object
Name of the processor.
-
#target ⇒ Object
readonly
Name of the attribute that contains the result of the arithmetic operation.
-
#type ⇒ Object
readonly
Type of logs arithmetic processor.
Method Summary
Methods included from BaseGenericModel
Instance Attribute Details
#expression ⇒ Object
Arithmetic operation between one or more log attributes.
49 50 51 |
# File 'lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb', line 49 def expression @expression end |
#is_enabled ⇒ Object
Whether or not the processor is enabled.
52 53 54 |
# File 'lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb', line 52 def is_enabled @is_enabled end |
#is_replace_missing ⇒ Object
If true, it replaces all missing attributes of expression by 0, false skip the operation if an attribute is missing.
56 57 58 |
# File 'lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb', line 56 def is_replace_missing @is_replace_missing end |
#name ⇒ Object
Name of the processor.
59 60 61 |
# File 'lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb', line 59 def name @name end |
#target ⇒ Object
Name of the attribute that contains the result of the arithmetic operation.
62 63 64 |
# File 'lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb', line 62 def target @target end |
#type ⇒ Object
Type of logs arithmetic processor.
65 66 67 |
# File 'lib/datadog_api_client/v1/models/logs_arithmetic_processor.rb', line 65 def type @type end |