-
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
[Telemetry] collector set to np #51618
Conversation
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
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 look good 👍
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.
The lens stuff looks good to me. I didn't review the over-arching PR, nor did I pull it down and run it.
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.
APM changes look good.
💚 Build Succeeded |
💚 Build Succeeded |
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.
ML 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.
LGTM! Thanks for doing this. It looks like a lot of work! Thanks for helping me understand the current status of Telemetry Plugin (still in Legacy) and Usage Collection Plugin (New Platform)
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.
Spaces related changes LGTM! Thanks for doing this!
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.
File Upload changes lgtm!
|
||
export const initServerWithKibana = (kbnServer: KbnServer) => { | ||
export const initServerWithKibana = (kbnServer: Server) => { | ||
const usageCollection = kbnServer.newPlatform.setup.plugins.usageCollection as UsageCollection; |
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.
So ideally in the NP and if we were shimmed correctly here, this would all happen in the setup
method right?
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.
@jasonrhodes correct. you can check the (dev notes) for a full example.
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.
No fundamental problems I'm worried about, just some suggestions.
maximumWaitTimeForAllCollectorsInS: config.maximumWaitTimeForAllCollectorsInS, | ||
}); | ||
|
||
return collectorSet; |
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.
You may want to expose this as a key on an object to make changes to this API in the future simpler:
return collectorSet; | |
return { collectorSet }; |
That way you can add additional keys to the exposed API without breaking existing usages.
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.
@joshdover my aim is to keep the setup function only for initializing this class and passing configs to it. The actual contract is the CollectorSet
class itself. This would prevent bloating the code inside the plugin itself, and restricting it inside the CollectorSet
class.
}); | ||
|
||
// register usage collector | ||
usageCollection.registerCollector(myCollector); |
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.
Is this step useful? Seems like it'd be nice if usageCollection.makeUsageCollector
just automatically registered it 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.
I wanted to keep the changes to the collectorSet
api to a minimal.
Initially the idea behind was that we might want to do other stuff to the collector other than registering it with the usage collector.
This might still be the case we'd want to have with statsCollector
. which use the same collector but register it under statsCollection
: used for monitoring ui stats and does not report it under usage
.
register: (options: unknown) => unknown; | ||
}; | ||
}; | ||
export type APMLegacyServer = Pick<Server, 'savedObjects' | 'log'> & { |
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.
Yay, no more custom types. I think actually you can remove all of it so:
export type APMLegacyServer = Server;
(yes, we should just delete APMLegacyServer
and use Server
everywhere)
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.
FWIW, this was per suggestion of @rudolf, to be very explicit about whatever functionality we are still using from Server
, so we have better control over what we allow Server
to be used for. I personally still think that that is a good idea
💚 Build Succeeded |
* upstream/7.x: Fix infinite redirect loop when multiple cookies are sent (elastic#50452) (elastic#51821) [Console] Proxy fallback (elastic#50185) (elastic#51814) Added endgame-* index and new heading 3 Elastic Endpoint SMP. (elastic#51071) (elastic#51828) [Maps] Added options to disable zoom, hide tool tips, widgets/overlays in embeddable maps (elastic#50663) (elastic#51811) Move errors and validate index pattern ⇒ NP (elastic#51805) (elastic#51831) [SIEM][Detection Engine] Adds ecs threat properties to rules (elastic#51782) (elastic#51827) [Lens] Remove client-side reference to server source code (elastic#51763) (elastic#51825) fixes drag and drop in tests (elastic#51806) (elastic#51813) [Uptime] Redesign/44541 new monitor list expanded row (elastic#46567) (elastic#51809) [7.x] [Telemetry] collector set to np (elastic#51618) (elastic#51787) [Uptime] added test for chart wrapper (elastic#50399) (elastic#51808) Expressions service fixes: better error and loading states handling (elastic#51183) (elastic#51800) Query String(Bar) Input - cleanup (elastic#51598) (elastic#51804) [ML] Adjust and re-enable categorization advanced wizard test (elastic#51005) (elastic#51017) fixes url state tests (elastic#51746) (elastic#51798) fixes browser field tests (elastic#51738) (elastic#51799) [Task Manager] Tests for the ability to run tasks of varying durations in parallel (elastic#51572) (elastic#51701) [ML] Fix anomaly detection test suite (elastic#51712) (elastic#51795) [SIEM] Fix Timeline drag and drop behavior (elastic#51558) (elastic#51793)
Fully migrate (
server.usage.collectorSet
) to New Platform under (UsageCollection
) plugin.The PR is huge but its mostly moving plugins to use this NP plugin instead.
UsageCollection
usage.collectorSet
from core.src/plugins/usage_collection/README.md
Testing
makeStatsCollector
compatiblity.Reviewers:
The PR is huge as it is touching many-many plugins, if your team is required a review; a quick way to filter the files to see only the changes relevant to you is
by filtering the files through github:
Footer Notes
This PR does not change the current
collectorSet
behavior in any way.Closes #46924
Closes #51371
Dev Docs
Fully migrate (
server.usage.collectorSet
) to New Platform under (UsageCollection
) plugin. To use theUsageCollector
plugin to collect server side stats with the NP follow the quick guide below (Note that all the plugins are already migrated to use this new plugin in this very same PR):usageCollection
is in your optional Plugins:setup
function:server/collectors/register.ts
.