-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(plugin_api): wrong metric type enums #1885
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -298,13 +298,13 @@ typedef enum ss_plugin_log_severity | |
// Types supported by the by the metric values | ||
typedef enum ss_plugin_metric_value_type | ||
{ | ||
SS_PLUGIN_METRIC_VALUE_TYPE_U32 = 1, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_S32 = 2, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_U64 = 3, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_S64 = 4, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_D = 5, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_F = 6, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_I = 7, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_U32 = 0, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_S32 = 1, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_U64 = 2, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_S64 = 3, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_D = 4, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_F = 5, | ||
SS_PLUGIN_METRIC_VALUE_TYPE_I = 6, | ||
Comment on lines
+301
to
+307
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically, this is a backward incompatible change, isn't it? So, unfortunately, I believe we have to bump the /hold a bit for second opinions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another option would be: Since this couldn't be used before (because of the missing registered symbol), we assume the 3.5.0 did not have this feature at all. Thus, just bumping the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree @leogr we can consider this feature not yet usable in the current release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yet another option: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree with Leo, since it was unusable in 0.17.1, we can consider a minor bump. |
||
} ss_plugin_metric_value_type; | ||
|
||
// Data representation of metric values | ||
|
@@ -322,8 +322,8 @@ typedef union ss_plugin_metric_value | |
// Metric types | ||
typedef enum ss_plugin_metric_type | ||
{ | ||
SS_PLUGIN_METRIC_TYPE_MONOTONIC = 1, | ||
SS_PLUGIN_METRIC_TYPE_NON_MONOTONIC = 2, | ||
SS_PLUGIN_METRIC_TYPE_MONOTONIC = 0, | ||
SS_PLUGIN_METRIC_TYPE_NON_MONOTONIC = 1, | ||
} ss_plugin_metric_type; | ||
|
||
// | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this moved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we insert plugin metrics first in the vector, they then get overwritten by scap/sinsp metrics.
I didn't look closely at it, but the cause may be: https://github.com/falcosecurity/libs/blob/master/userspace/libsinsp/metrics_collector.cpp#L487