mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Telemetry] Log opt-in status at the INFO level (#158830)
This commit is contained in:
parent
076b470e37
commit
18e145ccb6
3 changed files with 14 additions and 1 deletions
|
@ -767,5 +767,8 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
|
|||
synthetics: {
|
||||
featureRoles: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/synthetics-feature-roles.html`,
|
||||
},
|
||||
telemetry: {
|
||||
settings: `${KIBANA_DOCS}telemetry-settings-kbn.html`,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
|
@ -536,4 +536,7 @@ export interface DocLinks {
|
|||
readonly synthetics: {
|
||||
readonly featureRoles: string;
|
||||
};
|
||||
readonly telemetry: {
|
||||
readonly settings: string;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -149,9 +149,16 @@ export class TelemetryPlugin implements Plugin<TelemetryPluginSetup, TelemetryPl
|
|||
}
|
||||
|
||||
public setup(
|
||||
{ analytics, http, savedObjects }: CoreSetup,
|
||||
{ analytics, docLinks, http, savedObjects }: CoreSetup,
|
||||
{ usageCollection, telemetryCollectionManager }: TelemetryPluginsDepsSetup
|
||||
): TelemetryPluginSetup {
|
||||
this.isOptedIn$.subscribe((optedIn) => {
|
||||
const optInStatusMsg = optedIn ? 'enabled' : 'disabled';
|
||||
this.logger.info(
|
||||
`Telemetry collection is ${optInStatusMsg}. For more information on telemetry settings, refer to ${docLinks.links.telemetry.settings}.`
|
||||
);
|
||||
});
|
||||
|
||||
if (this.isOptedIn !== undefined) {
|
||||
analytics.optIn({ global: { enabled: this.isOptedIn } });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue