-
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
[Usage Collection] [schema] alerts
#78933
Conversation
"count_active_by_type": { | ||
"properties": { | ||
"DYNAMIC_KEY": { | ||
"type": "long" | ||
} | ||
} | ||
}, | ||
"count_by_type": { | ||
"properties": { | ||
"DYNAMIC_KEY": { | ||
"type": "long" | ||
} | ||
} | ||
} |
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.
ee94cea
to
a65b7ce
Compare
a65b7ce
to
2a45f05
Compare
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Pinging @elastic/kibana-telemetry (Team:KibanaTelemetry) |
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.
Schema additions for known fields GTM. I'm on the fence about providing "DYNAMIC_KEY" types if we don't have known values.
}, | ||
"count_active_by_type": { | ||
"properties": { | ||
"DYNAMIC_KEY": { |
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 as comment #78832 (comment)
Having a placeholder for unknowns is a great way to keep track of fields that are probably unmapped right now. If Infra isn't comfortable with filtering out the DYNAMIC_KEY
fields, we'll have to take care of that in the diff we provide at FF (i.e. ignore these fields because they can't be mapped in the legacy service indices anyway).
avg: { type: 'float' }, | ||
max: { type: 'long' }, | ||
}, | ||
// TODO: Find out all the possible values for DYNAMIC_KEY or reformat into an array |
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.
Cross referencing a discussion from #78832 (comment) in regards to if these can be gathered somehow. For this one, plugins do call registerType
for their own types of alerts.
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.
Thank you @mikecote! I'll run through the code to find all the known registered types.
Do you think we can still keep the extra DYNAMIC_KEY
entry to let the Remote Telemetry team know that it might grow in the future?
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.
Done! I've added the known registered alerts. We might need to re-run this search after each FF to keep it up to date thought (or find out a way to populate it automatically, or reformat that key into an array the Remote Service can deal with).
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.
seems like a good workaround for this issue to fix the schema.
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.
LGTM with the known fields.
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.
Alerting changes LGTM!
import { get } from 'lodash'; | ||
import { TaskManagerStartContract } from '../../../task_manager/server'; | ||
import { AlertsUsage } from './types'; | ||
|
||
const byTypeSchema: MakeSchemaFrom<AlertsUsage>['count_by_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.
@mindbat same question as #78832 (comment).
@mindbat did you want the alerting team to keep updating this list on each release when new actions exist? or will it be possible with the
DYNAMIC_KEY
to automatically handle new types of actions per release on your end?
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-core (Team:Core) |
Summary
Add
schema
definition to the collectoralerts
.Using
DYNAMIC_KEY
as a way to tell when the key can be dynamic, and we can't know the possible values.Related to #70180.
For maintainers