-
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
[Cases] Adding mime type telemetry #154679
[Cases] Adding mime type telemetry #154679
Conversation
totalCasesForOwner: number; | ||
}): AttachmentFramework => { | ||
if (!attachmentAggregations) { | ||
return emptyAttachmentFramework(); | ||
} | ||
const averageFileSize = filesAggregations?.averageSize; | ||
|
||
const averageFileSize = filesAggregations?.averageSize?.value; |
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.
This was a bug before. We're doing an average aggregation so we need to use value
to get the actual result.
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
cc @elastic/platform-analytics @shahinakmal @elasticelvin |
This PR adds telemetry for collecting statistics for the mimetypes of the files uploaded to cases.
It only looks for the top 20 mime types using a terms aggregation. It does this across all cases and broken down by owner. On the telemetry server we'll need to create a single document per entry in the array here so we can do filtering for the visualizations.
Example
Example telemetry result
Testing
To test modify this file: https://github.com/elastic/kibana/blob/main/x-pack/plugins/cases/server/telemetry/schedule_telemetry_task.ts
With:
This will cause the telemetry to be sent as soon as the server is restarted.
To generate files and attachments to add stats to the telemetry I created this python script: https://github.com/elastic/cases-files-generator
To retrieve the telemetry: