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
// TODO: decouple the metrics from the sinks and thresholds... have them
// linked, but not in the same struct?
Tainted null.Bool`json:"tainted"`
ThresholdsThresholds`json:"thresholds"`
Submetrics []*Submetric`json:"submetrics"`
Sub*Submetric`json:"-"`
SinkSink`json:"-"`
Observedbool`json:"-"`
}
The current metric has a bunch of fields used by the ingester, summary and engine to:
aggregate metric samples for the summary and thresholds
evelaute thresholds and it subthresholds
None of those are essentials to hte metrics and the current users of the code need to know to not touch those values.
Arguably also those fields shouldn't be exported at all
How?
Move all of those fields in the places where they are useful as well as the type definitions. Probably make them internal.
In the past users (and core developers) have used those to implement metric outputs among other things, and while it might work for some cases, it has also introduced complex bugs and have always fell short. As well that isn't the intended purpose.
Related issues/PRs:
#2735 will be part of this #2320 will likely be closed as part of this as well
The text was updated successfully, but these errors were encountered:
What?
Basically the TODO here:
k6/metrics/metric.go
Lines 11 to 26 in 55eb8bc
The current metric has a bunch of fields used by the ingester, summary and engine to:
None of those are essentials to hte metrics and the current users of the code need to know to not touch those values.
Arguably also those fields shouldn't be exported at all
How?
Move all of those fields in the places where they are useful as well as the type definitions. Probably make them internal.
In the past users (and core developers) have used those to implement metric outputs among other things, and while it might work for some cases, it has also introduced complex bugs and have always fell short. As well that isn't the intended purpose.
Related issues/PRs:
#2735 will be part of this
#2320 will likely be closed as part of this as well
The text was updated successfully, but these errors were encountered: