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

[Usage Collection] Ensure no type duplicates #70946

Merged
merged 3 commits into from
Jul 7, 2020

Conversation

afharo
Copy link
Member

@afharo afharo commented Jul 7, 2020

Summary

Fixes #70940.

This PR crashes Kibana when a plugin registers a collector with a type that is previously registered. It helps the development process to make sure some plugins' usage collectors don't overwrite others' (naming can be hard) 😅

An example of registering 2 collectors with the same name application_usage:

 FATAL  Error: Usage collector's type "application_usage" is duplicated.

 server crashed  with status code 1

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@afharo afharo added Feature:Telemetry v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:KibanaTelemetry labels Jul 7, 2020
@afharo afharo marked this pull request as ready for review July 7, 2020 14:50
@afharo afharo requested a review from a team as a code owner July 7, 2020 14:50
@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.

I added one comment, otherwise LGTM!

src/plugins/usage_collection/README.md Outdated Show resolved Hide resolved
Co-authored-by: Christiane (Tina) Heiligers <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@afharo afharo merged commit 3884a3c into elastic:master Jul 7, 2020
@afharo afharo deleted the usage-collector/check-type-duplicates branch July 7, 2020 19:01
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 8, 2020
* master: (36 commits)
  fixed api url in example plugin (elastic#70934)
  [data.search.aggs]: Remove remaining client dependencies (elastic#70251)
  [Security Solution][Endpoint] Fix base64 download bug and adopt new user artifact/manifest format (elastic#70998)
  [Security Solution][Exceptions] - Exception Modal Part I (elastic#70639)
  [SIEM][Detection Engine][Lists] Adds additional data types to value based lists
  [SIEM][Detection Engine][Lists] Removes feature flag for lists
  [APM] Show license callout in ML settings (elastic#70959)
  Migrate service settings test to jest (elastic#70992)
  [APM] Add cloud attributes to data telemetry (elastic#71008)
  Fix breadcrumb on panels for visibility / round corners (elastic#71010)
  Improve search typescript (elastic#69333)
  [savedObjects field count] run in baseline job (elastic#70999)
  [Security Solution] [Timeline] Timeline manager tweaks (elastic#69988)
  [Endpoint] Support redirect from Policy Details to Ingest when user initiates Edit Policy from Datasource Edit page (elastic#70874)
  [APM] Add API tests (elastic#70740)
  [Security Solution][Exceptions] - Tie server and client code together (elastic#70918)
  [Audit Logging] Add AuditTrail service (elastic#69278)
  [Usage Collection] Ensure no type duplicates (elastic#70946)
  [Security Solution] [Timeline] Bugfix for timeline row actions disappear sometimes (elastic#70958)
  [CI] Add pipeline task queue framework and merge workers into one (elastic#64011)
  ...
afharo added a commit that referenced this pull request Jul 8, 2020
@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 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Usage Collection] Ensure unique type in usage collectors
5 participants