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

chore: remove usage for stats endpoint #151082

Merged
merged 13 commits into from
Feb 27, 2023

Conversation

nnacin
Copy link
Contributor

@nnacin nnacin commented Feb 13, 2023

Summary

Closes #150429

Do not extend the payload with telemetry usage.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@kibanamachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@afharo
Copy link
Member

afharo commented Feb 14, 2023

buildkite test this

@afharo
Copy link
Member

afharo commented Feb 14, 2023

@elasticmachine run elasticsearch-ci/docs

@afharo afharo added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting release_note:fix and removed release_note:skip Skip the PR/issue when compiling release notes labels Feb 14, 2023
@afharo
Copy link
Member

afharo commented Feb 14, 2023

  • *I got the same error when try to run eslint to fix the styling and jest to run tests (no such file or directory ...kibana/packages/kbn-repo-packages/package-map.json)

@nnacin did you run yarn kbn bootstrap to install all the dependencies?

@afharo
Copy link
Member

afharo commented Feb 14, 2023

@elasticmachine run elasticsearch-ci/docs

@afharo
Copy link
Member

afharo commented Feb 14, 2023

buildkite test this

@afharo
Copy link
Member

afharo commented Feb 14, 2023

@nnacin let me know if you can't see the CI errors. I can help you with highlighting what's failing.

@nnacin
Copy link
Contributor Author

nnacin commented Feb 14, 2023

@nnacin let me know if you can't see the CI errors. I can help you with highlighting what's failing.

Thank you @afharo ! I can see the failures, I was working on fixing some. But I have a question, is my approach correct, should I remove completely the property usage or you prefer that we keep it and return an empty object (based on that I will be adjusting the tests)

@afharo
Copy link
Member

afharo commented Feb 14, 2023

should I remove completely the property usage or you prefer that we keep it and return an empty object (based on that I will be adjusting the tests)

TBH, I don't have a strong preference. However, looking at the current behavior, even when usage is not requested, this API returns an empty object.

I wonder if returning it as empty is the least impactful change.

What do you think?

@nnacin
Copy link
Contributor Author

nnacin commented Feb 21, 2023

buildkite test this

1 similar comment
@afharo
Copy link
Member

afharo commented Feb 21, 2023

buildkite test this

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

🧡

@@ -91,6 +91,7 @@ export default function ({ getService }) {
.then(({ body }) => {
expect(body.cluster_uuid).to.be.a('string');
expect(body.usage).to.be.an('object'); // no usage collectors have been registered so usage is an empty object
expect(body.usage).to.eql({});
Copy link
Member

Choose a reason for hiding this comment

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

🧡

@afharo
Copy link
Member

afharo commented Feb 23, 2023

@elasticmachine merge upstream

@afharo
Copy link
Member

afharo commented Feb 23, 2023

buildkite test this

@afharo
Copy link
Member

afharo commented Feb 23, 2023

@elasticmachine run elasticsearch-ci/docs

@afharo
Copy link
Member

afharo commented Feb 24, 2023

@nnacin, it looks like everything is ready to send this PR to review. Isn't it?

@nnacin
Copy link
Contributor Author

nnacin commented Feb 26, 2023

@nnacin, it looks like everything is ready to send this PR to review. Isn't it?

@afharo - I added two suggestions for the README because there were still references to usage, I can commit those, make any updates or I mark it for review and get the opinions then?

@afharo
Copy link
Member

afharo commented Feb 26, 2023

@nnacin, great call! I commented on those 🙂

Feel free to mark it as ready to review whenever you are comfortable with it.

nnacin and others added 3 commits February 27, 2023 11:26
@afharo
Copy link
Member

afharo commented Feb 27, 2023

@elasticmachine run elasticsearch-ci/docs

@afharo
Copy link
Member

afharo commented Feb 27, 2023

buildkite test this

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 428 430 +2

Total ESLint disabled count

id before after diff
securitySolution 506 508 +2

History

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

@nnacin nnacin marked this pull request as ready for review February 27, 2023 12:19
@nnacin nnacin requested review from a team as code owners February 27, 2023 12:19
Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

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

LGTM!

Thank you for your contribution, @nnacin! It is greatly appreciated! 🧡

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

LGTM! Great work!

@afharo afharo merged commit fa0a29f into elastic:main Feb 27, 2023
wwang500 pushed a commit to wwang500/kibana that referenced this pull request Feb 27, 2023
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
@nnacin
Copy link
Contributor Author

nnacin commented Feb 27, 2023

LGTM!

Thank you for your contribution, @nnacin! It is greatly appreciated! 🧡

@afharo thank you for the guidance! 😊

@nnacin nnacin deleted the chore-150429/remove-usage branch February 27, 2023 22:12
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this pull request Mar 10, 2023
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
@KOTungseth KOTungseth added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:Telemetry labels Apr 26, 2023
@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
backport:skip This commit does not require backporting 💝community Feature:Telemetry release_note:fix Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not return usage in GET /api/stats
7 participants