-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Revisit custom threshold types in public folder #170306
Changes from 23 commits
f0b93a7
000696c
babe850
7385077
b23afdf
4b6b1fa
cf8e0f6
84ded2f
f79a012
881a6c1
886a4ed
9b3f22e
c69f7b0
4d6e9f0
c4e25e8
cd73bae
d2417fc
922c069
a298924
5ef6a4c
de870f6
2bcb226
6debb6f
d630f20
1e7ea5d
7bbca06
261685c
a24ebd6
e02debb
a91dc5e
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 |
---|---|---|
|
@@ -5,16 +5,13 @@ | |
* 2.0. | ||
*/ | ||
|
||
export const SNAPSHOT_CUSTOM_AGGREGATIONS = ['avg', 'max', 'min', 'rate'] as const; | ||
export const METRIC_EXPLORER_AGGREGATIONS = [ | ||
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. To be deleted it's not used anymore. 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. Actually, this is still used in x-pack/plugins/observability/server/lib/rules/custom_threshold/register_custom_threshold_rule_type.ts |
||
'avg', | ||
'max', | ||
'min', | ||
'cardinality', | ||
'rate', | ||
'count', | ||
'sum', | ||
'p95', | ||
'p99', | ||
'custom', | ||
] as const; | ||
|
||
export const CUSTOM_AGGREGATOR = 'custom'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ import { InfraWaffleMapDataFormat } from './types'; | |
|
||
export const FORMATTERS = { | ||
number: formatNumber, | ||
// Because the implimentation for formatting large numbers is the same as formatting | ||
// Because the implementation for formatting large numbers is the same as formatting | ||
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. 👍 |
||
// bytes we are re-using the same code, we just format the number using the abbreviated number format. | ||
abbreviatedNumber: createBytesFormatter(InfraWaffleMapDataFormat.abbreviatedNumber), | ||
// bytes in bytes formatted string out | ||
|
This file was deleted.
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.
Same: I think we should keep referring to the
custom
fromAggregators
to keep everything on track when an updates occurs. Can you explain the benefits of not using the value fromAggregators
?I will not repeate the same comment for the other files :D
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.
I changed it to
CUSTOM_AGGREGATOR
because it is the only acceptable value at this level and does not belong toAggregators
anymore. There were a lot of type duplications to handle this scenario, and by splitting them, we don't need to excludecustom
fromAggregators
to be used in the rule.I am considering creating a ticket to remove
CUSTOM_AGGREGATOR
everywhere if it does not have a backward compatibility issue.