-
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
[Usage Collection] Report nodes feature usage #70108
[Usage Collection] Report nodes feature usage #70108
Conversation
Pinging @elastic/kibana-telemetry (Team:KibanaTelemetry) |
cc @mindbat this PR adds the response from a GET request to |
@imotov @polyfractal, here's the PR for adding nodes feature usage aggregations (and rest actions) to the usage collection payload. The work only covers the case for when usage collection is local, i.e. monitoring is not enabled. |
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.
It's looking great! I noticed a couple of gotchas. But happy to approve it if they are intended 👍
src/plugins/telemetry/server/telemetry_collection/get_local_stats.ts
Outdated
Show resolved
Hide resolved
src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.test.ts
Outdated
Show resolved
Hide resolved
src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts
Outdated
Show resolved
Hide resolved
src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts
Outdated
Show resolved
Hide resolved
src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts
Outdated
Show resolved
Hide resolved
...collection_xpack/server/telemetry_collection/__snapshots__/get_stats_with_xpack.test.ts.snap
Outdated
Show resolved
Hide resolved
…ats.ts Using native merge without mutating the original object. Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
…-usage-local-collection
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / kibana-oss-agent / Plugin Functional Tests.test/plugin_functional/test_suites/core_plugins/logging·ts.core plugins plugin logging writes info_json context to custom JSON appenderStandard Out
Stack Trace
Build metrics
History
To update your PR or re-run it, just comment 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.
LGTM!
} | ||
const result = await fetchNodesUsage(callCluster); | ||
const transformedNodes = Object.entries(result?.nodes || {}).map(([key, value]) => ({ | ||
...(value as NodeObj), |
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.
NIT: I think there is no need for the cast now that fetchNodesUsage
is properly typed :)
* master: [ML] Modifies page title to Create job (elastic#70191) [APM] Add API test for service maps (elastic#70185) [DOCS] Adds glossary to documentation (elastic#69721) [Usage Collection] Report nodes feature usage (elastic#70108) chore: improve support for mjs file extension (elastic#70186) [ML] Anomaly Detection: ensure 'Category examples' tab in the expanded table row can be seen (elastic#70241) [Maps] Add maps telemetry saved object in with mappings disabled (elastic#69995) Fix typo in bootstrap command (elastic#69976) [code coverage] ingest correct coveredFilePath for mocha (elastic#70215) [Dashboard] Add visualization by value to dashboard (elastic#69898) updates wording in Cases connectors (elastic#70298) [ML] Fix license subscription race condition. (elastic#70074) [Logs UI] [Alerting] "Group by" functionality (elastic#68250)
* Adds nodes feature usage stats merged into cluster_stats.nodes when usage collection is local
Pinging @elastic/kibana-core (Team:Core) |
Summary
Closes #68603
This PR allows us to track different types of aggregations performed on cluster nodes as well as determine the rest actions that were issued. Note that this PR only handles the case of usage data being collected locally. The case for when monitoring is enabled will be addressed in a different issue.
The original request was to add aggregations to the rest_actions from the nodes feature usage data but we weren't reporting any of that data.
The data is reported pretty much as-is, although the structure is modified slightly from the raw response.
raw response:
format of response reported _within `cluster_stats.nodes`_:
screenshots:
Preview of part of the response from
POST /api/telemetry/v2/clusters/_stats
:How it renders in the UI (note that this is a one-node cluster running locally):
Checklist
Delete any items that are not applicable to this PR.
For maintainers