Package com.datadog.api.client.v1.model
Class LogsArithmeticProcessor
java.lang.Object
com.datadog.api.client.v1.model.LogsArithmeticProcessor
@Generated("https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class LogsArithmeticProcessor
extends Object
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.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLogsArithmeticProcessor(String expression, String target, LogsArithmeticProcessorType type) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if this LogsArithmeticProcessor object is equal to o.expression(String expression) Return the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Arithmetic operation between one or more log attributes.Whether or not the processor is enabled.Iftrue, it replaces all missing attributes of expression by0,falseskip the operation if an attribute is missing.getName()Name of the processor.Name of the attribute that contains the result of the arithmetic operation.getType()Type of logs arithmetic processor.inthashCode()isReplaceMissing(Boolean isReplaceMissing) putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.voidsetExpression(String expression) voidsetIsEnabled(Boolean isEnabled) voidsetIsReplaceMissing(Boolean isReplaceMissing) voidvoidvoidtoString()
-
Field Details
-
unparsed
public boolean unparsed -
JSON_PROPERTY_EXPRESSION
- See Also:
-
JSON_PROPERTY_IS_ENABLED
- See Also:
-
JSON_PROPERTY_IS_REPLACE_MISSING
- See Also:
-
JSON_PROPERTY_NAME
- See Also:
-
JSON_PROPERTY_TARGET
- See Also:
-
JSON_PROPERTY_TYPE
- See Also:
-
-
Constructor Details
-
LogsArithmeticProcessor
public LogsArithmeticProcessor() -
LogsArithmeticProcessor
-
-
Method Details
-
expression
-
getExpression
Arithmetic operation between one or more log attributes.- Returns:
- expression
-
setExpression
-
isEnabled
-
getIsEnabled
Whether or not the processor is enabled.- Returns:
- isEnabled
-
setIsEnabled
-
isReplaceMissing
-
getIsReplaceMissing
Iftrue, it replaces all missing attributes of expression by0,falseskip the operation if an attribute is missing.- Returns:
- isReplaceMissing
-
setIsReplaceMissing
-
name
-
getName
Name of the processor.- Returns:
- name
-
setName
-
target
-
getTarget
Name of the attribute that contains the result of the arithmetic operation.- Returns:
- target
-
setTarget
-
type
-
getType
Type of logs arithmetic processor.- Returns:
- type
-
setType
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- The arbitrary key to setvalue- The associated value- Returns:
- LogsArithmeticProcessor
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- The additional properties
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- The arbitrary key to get- Returns:
- The specific additional property for the given key
-
equals
Return true if this LogsArithmeticProcessor object is equal to o. -
hashCode
public int hashCode() -
toString
-