-
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
[Usage Collection] Improves Collector fetch
API
#79595
[Usage Collection] Improves Collector fetch
API
#79595
Conversation
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.
Canvas changes lgtm
Resolves issues with merge conflicts Cleans up unused types Visualizations collector post merge fix
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
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.
Checked Uptime changes, telemetry logging appears to be working as I'd expect. LGTM
@elasticmachine merge upstream |
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.
AppArch changes LGTM
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.
Security solution changes look good to me, thanks!
x-pack/plugins/security/server/usage_collector/security_usage_collector.test.ts
Outdated
Show resolved
Hide resolved
@@ -10,6 +10,7 @@ import { PluginsSetup } from '../plugin'; | |||
import { KibanaFeature } from '../../../features/server'; | |||
import { ILicense, LicensingPluginSetup } from '../../../licensing/server'; | |||
import { pluginInitializerContextConfigMock } from 'src/core/server/mocks'; | |||
import { createCollectorFetchContextMock } from 'src/plugins/usage_collection/server/usage_collection.mock'; |
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.
question: same question about importing from 'src/plugins/usage_collection/server/mocks'
here as well.
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.
@azasypkin Also fixed
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.
KibanaApp code review only, LGTM!
💛 Build succeeded, but was flaky
Test FailuresCreates a timeline.Timelines Creates a timelineStack Trace
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
) Co-authored-by: Kibana Machine <[email protected]>
Pinging @elastic/kibana-core (Team:Core) |
Why has my team been pinged?
This is a breaking change in the Kibana telemetry usage collectors'
fetch
method and required refactoring collectors in all the plugins that currently use callCluster.Notes to reviewers:
All you need to do is check that the changes to your plugin usage collector (and unit tests) are ok.
PR details
Handles step 3 in #74840 (comment).
Summary:
Replaces callCluster and esClient as the arguments to collectors'
fetch
method with { callCluster, esClient }.Description:
As part of migrating over to the new Elasticsearch client, we provided the new client as an additional parameter to the fetch method in collectors and pass the client down as an additional collection config parameter.
To use the new client forces plugin owners to provide the old client as well, which is not ideal.
This work refactors the way in which we provide the clients from individual arguments to an object, allowing plugins to select the client they wish to use.
Before:
After:
This is a breaking change and required updates to all collectors using
callCluster
.Checklist
For maintainers