-3

I am creating an API that will expose a list of metrics data. Each metric data will contain the following:

metricName
lowerThreshold
upperThreshold

The defined thresholds here are what will determine whether the current value of the metric is good or bad.


The behavior of the application will be based on how the current value of the metric compares to the bounds

CASE 1

If metric is lower than upperThreshold -> Warning

If metric is lower than lowerThreshold -> Action


The prefix upper and lower will not always hold true. There are metrics where the objective is to minimize a number, in which case the upperThreshold will be lower than the lowerThreshold

CASE 2

If metric is higher than upperThreshold -> Warning

If metric is higher than lowerThreshold -> Action

What would be the right way to name these bounds such that there is no confusion regarding which one is the better metric without inferring anything about the relationship between the 2 bounds?

closed as primarily opinion-based by gnat, BobDalgleish, Bart van Ingen Schenau, user53019 Jun 18 at 12:19

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • If you have a metric which you want to maximize (bigger is better), would you still have some upper bound (too big, too much good)? – Nick Alexeev May 30 at 6:53
  • Yes. But it would not mean what your thinking. Any metric must always be above the lowerThreshold and should ideally be above the upperThreshold. Maybe the term thershold in itself could be misleading. – Sinstein May 30 at 6:54
  • If metric is lower than upperThreshold -> Warning If metric is lower than lowerThreshold -> Action – Sinstein May 30 at 6:55
  • 2
    "Bound" in the title might be more misleading that "threshold". – Nick Alexeev May 30 at 7:03
1

How about incorporating the implication into your flip value rather than a meaningless "lower" or "upper"?

ActionThreshold and WarningThreshold.

Whether the implication would be effective above or below could differ but should be clear from context.

  • 1
    Or, alternatively: (action) -- WarningThr. -- (warning) -- ErrorThr. -- (error), if that makes more sense. – Filip Milovanović May 30 at 11:42
0

If metric is lower than upperThreshold, then Warning.
If metric is lower than lowerThreshold, then Action.
[For cases when bigger is better.]

I propose this naming scheme. Prefix "minimum" for metrics where larger value is better. Prefix "maximum" for values where smaller values is better. Suffix "recommended" for warning thresholds. Suffix "required" for action threshold (or no suffix at all for action threshold).

A metric where larger values are better would have:
minimumRecommended for Warnig threshold minimumRequired (or simply minimum) for Action threshold,

A metric where smaller values are better would have:
maximumRecommended for Warning threshold, maximumRequired (or simply maximum) for Action threshold,

  • So you are saying I should have a different schema for metrics based on whether they are a maximizing metric of a minimizing metric? – Sinstein May 30 at 7:15
  • Different prefixes for maximizing or minimizing. (I'd still call it all one schema.) – Nick Alexeev May 30 at 7:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.