You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context
Currently with SignalToMetricsConnector, when configuring a logs based metric using attribute/resource keys as tags, renaming a key requires creating a new attribute with the desired name. This approach leads to data duplication and a more complex configuration.
Additionally, if a default value is not set for a non-existent attribute key, the metric is not counted, which can result in data loss.
Proposed Changes
Add a name field to allow overriding the name of a key without creating a new attribute.
Example configuration after the change:
yaml
Modifier
name: poc1.kong.http.count
description: Count of log records
conditions:
Here, the bu_code key will be used as custom_bu_code without duplicating data.
Handle null values properly:
Currently, if an attribute key is missing and no default value is defined, the metric is not counted.
This fix ensures that the component handles missing attributes without requiring an explicit default value.
Impact & Benefits
Reduces attribute duplication.
Simplifies configuration.
Prevents metric loss when attribute keys are missing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Context
Currently with SignalToMetricsConnector, when configuring a logs based metric using attribute/resource keys as tags, renaming a key requires creating a new attribute with the desired name. This approach leads to data duplication and a more complex configuration.
Additionally, if a default value is not set for a non-existent attribute key, the metric is not counted, which can result in data loss.
Proposed Changes
Add a name field to allow overriding the name of a key without creating a new attribute.
Example configuration after the change:
yaml
Modifier
description: Count of log records
conditions:
include_resource_attributes:
attributes:
default_value: "N/A"
name: "custom_bu_code"
default_value: "N/A"
name: "custom_consumer_id"
Here, the bu_code key will be used as custom_bu_code without duplicating data.
Handle null values properly:
Currently, if an attribute key is missing and no default value is defined, the metric is not counted.
This fix ensures that the component handles missing attributes without requiring an explicit default value.
Impact & Benefits
Beta Was this translation helpful? Give feedback.
All reactions