Skip to content
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

[/api/stats] Add documentation + small improvement #79330

Merged
merged 4 commits into from
Oct 5, 2020

Conversation

afharo
Copy link
Member

@afharo afharo commented Oct 2, 2020

Summary

  • Add some dev documentation about the /api/stats endpoint
  • Small improvement to avoid checking if all the collectors are ready if we are not going to use them. It should alleviate a bit of the load in Kibana. Especially on the cases when Metricbeat is polling every 10s with exclude_usage=true.

Resolves #75273.

Checklist

  • Documentation was added for features that require explanation or tutorials

For maintainers

@@ -152,9 +154,8 @@ export function registerStatsRoute({
}
}

// Guranteed to resolve immediately due to replay effect on getOpsMetrics$
// eslint-disable-next-line @typescript-eslint/naming-convention
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, OCD trying to avoid as many eslint-disable as possible 😅

@afharo afharo marked this pull request as ready for review October 2, 2020 19:34
@afharo afharo requested a review from a team as a code owner October 2, 2020 19:34
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-telemetry (Team:KibanaTelemetry)

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!
I added a couple of comments but these are only suggestions.

Thank you for doing this!

src/plugins/usage_collection/README.md Outdated Show resolved Hide resolved
src/plugins/usage_collection/server/routes/stats/README.md Outdated Show resolved Hide resolved
@@ -0,0 +1,20 @@
# `/api/stats`

This API returns the metrics for the Kibana server and usage stats. It allows the [Metricbeat Kibana module](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kibana.html) to collect the [stats metricset](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-kibana-stats.html).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs on the kibana stats metricset don't actually give anything useful. Having the link is great though and hopefully we can get a bit more on that page.

@Bamieh
Copy link
Member

Bamieh commented Oct 5, 2020

@elasticmachine merge upstream

Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id before after diff
default 47085 47087 +2
oss 28595 28597 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@afharo afharo merged commit 43493bb into elastic:master Oct 5, 2020
@afharo afharo deleted the usage_collection/routes/stats branch October 5, 2020 11:40
afharo added a commit that referenced this pull request Oct 5, 2020
…79440)

Co-authored-by: Christiane (Tina) Heiligers <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Ahmad Bamieh <[email protected]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Oct 5, 2020
…nes/fix-description-field

* 'master' of github.com:elastic/kibana:
  A11y tests for user page (elastic#79199)
  [Ingest Pipelines] Processors editor a11y focus states (elastic#79122)
  [Ingest pipelines] Clean up component integration tests (elastic#78838)
  Drilldowns in examples (elastic#75640)
  Storybook and Jest cleanup (elastic#79305)
  adds EQL sequence rule test (elastic#79287)
  PR template a11y checklist item improvement (elastic#79243)
  [Security Solution] Adding tests for dns pipeline in the endpoint package (elastic#79177)
  [ML] Only adjust the bounds of SMV if annotations are visible (elastic#79210)
  global search to ts refs (elastic#79446)
  [Index management] Update TemplateDeserialized interface (elastic#78913)
  [Telemetry] server fetcher check all collectors ready before sending (elastic#79398)
  [Mappings editor] Fix app crash when selecting "other" field type (elastic#79434)
  [`/api/stats`] Add documentation + small improvement (elastic#79330)
  [Discover] "View surrounding documents" encodes spaces in filters (elastic#79283)
  [Lens] refactor DimensionContainer and fix flyout bug (elastic#79277)

# Conflicts:
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/pipeline_processors_editor_item/inline_text_input.tsx
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processors_tree/components/private_tree.tsx
@lukeelmers lukeelmers added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Oct 1, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve documentation about /api/stats API
6 participants