-
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
[WIP] Move UsageCollection plugin to a Core Service #69306
Conversation
6bea618
to
a0f4a60
Compare
…ide (still plugin)
export { | ||
CollectorOptions as UsageCollectionCollectorOptions, | ||
CollectorFormatForBulkUpload as UsageCollectionCollectorFormatForBulkUpload, | ||
Collector as UsageCollectionCollector, | ||
Purify as UsageCollectionPurify, | ||
UsageCollector as UsageCollectionUsageCollector, | ||
MakeSchemaFrom as UsageCollectionMakeSchemaFrom, | ||
AllowedSchemaTypes as UsageCollectionAllowedSchemaTypes, | ||
} from './collectors'; |
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.
Renaming all interfaces when exposing them publicly to match the prefix-pattern in core.
@@ -1,6 +1,6 @@ | |||
{ | |||
"id": "usageCollection", | |||
"configPath": ["usageCollection"], | |||
"configPath": ["usageCollection.uiMetric"], |
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.
Doing this because the config "usageCollection"
is already registered by core. We are extending only the config re uiMetric
for the public-end code
maximumWaitTimeForAllCollectorsInS: schema.number({ | ||
defaultValue: DEFAULT_MAXIMUM_WAIT_TIME_FOR_ALL_COLLECTORS_IN_S, | ||
}), | ||
enabled: schema.boolean({ defaultValue: true }), |
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.
There is the risk that disabling uiMetric
, we'll disable this entire plugin (the core service would still be there though)?
Collector, | ||
} from './collector'; | ||
export { UsageCollectionSetup } from './plugin'; | ||
UsageCollectionPluginSetup as UsageCollectionSetup, |
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.
Using UsageCollectionPluginSetup
because it has the @deprecated
flag, encouraging to move to the core service.
💔 Build Failed
Failed CI StepsBuild metrics
History
To update your PR or re-run it, just comment with: |
No longer needed. Core will expose a telemetry-only API as suggested here |
Closing it in favour of the approach discussed in #56762 (comment) |
Summary
Related to #70779.
This is WIP to move the current UsageCollection plugin and convert it into a Core service.
TODOs:
ui_metric
andapplication_usage
logics to core?There is a tight dependency to the
@kbn/analytics
reporter. We might want to revisit it to keep it split in the plugins 👀Checklist
Delete any items that are not applicable to this PR.
For maintainers