-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Reporting/telemetry] Add 'statuses' object to usage to show status counts by jobType & appType #63922
[Reporting/telemetry] Add 'statuses' object to usage to show status counts by jobType & appType #63922
Conversation
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
@elasticmachine merge upstream |
|
||
type AggregationKeys = 'jobTypes' | 'layoutTypes' | 'objectTypes' | 'statusTypes'; | ||
export type AggregationResults = { [K in AggregationKeys]: AggregationBuckets } & { | ||
export interface AggregationResultBuckets { |
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.
There are a lot of Typescript changes in this PR, because the previous AggregationResults
type was taking a few "shortcuts" that made it difficult to build more to it. Therefore it has been replaced with AggregationResultBuckets
jobTypes: { | ||
terms: { field: JOB_TYPES_FIELD, size: DEFAULT_TERMS_SIZE }, | ||
aggs: { | ||
appNames: { terms: { field: OBJECT_TYPES_FIELD, size: DEFAULT_TERMS_SIZE } }, // NOTE Discover/CSV export is missing the 'meta.objectType' field, so Discover/CSV results are missing for this agg |
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.
To make it clear, this aggregation is not supporting metrics for the way we store CSV reports, but all the other types of reports are supported.
See the Jest snapshot for what it looks like for CSV
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.
Overall, looks good so I'm approving to unblock. I did have a question about the statuses
type and the comment describing the getAppStatuses
behavior though
x-pack/legacy/plugins/reporting/server/usage/get_reporting_usage.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…ounts by jobType & appType (elastic#63922) * [Reporting] Additional status by app data for usage * --wip-- [skip ci] * clean up types * add a prettier-ignore * fix types * --wip-- [skip ci] * fix typo * more tests * Tweak the data model * fix the comments and type keys to reflect the data model Co-authored-by: Elastic Machine <[email protected]>
…ounts by jobType & appType (#63922) (#64551) * [Reporting] Additional status by app data for usage * --wip-- [skip ci] * clean up types * add a prettier-ignore * fix types * --wip-- [skip ci] * fix typo * more tests * Tweak the data model * fix the comments and type keys to reflect the data model Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
This PR follows a request from @elastic/kibana-canvas to have Reporting usage data show the status type per app integration.
Example:
NOTE: CSV numbers are not available for the type of search aggregation being used. The reason is CSV Job parameters are missing the
meta.objectType.keyword
field which should be populated withdiscover
at CSV job creation time. Issue: #64119Checklist
For maintainers