mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Telemetry] Introduce UI Counters (#84224)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
e7d8dd48f3
commit
aa9a353205
119 changed files with 1647 additions and 401 deletions
|
@ -3,7 +3,7 @@
|
|||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
import { UiStatsMetricType, METRIC_TYPE } from '@kbn/analytics';
|
||||
import { UiCounterMetricType, METRIC_TYPE } from '@kbn/analytics';
|
||||
import { UsageCollectionSetup } from 'src/plugins/usage_collection/public';
|
||||
import { UIM_APP_NAME } from '../constants';
|
||||
|
||||
|
@ -15,12 +15,12 @@ export function init(_usageCollection: UsageCollectionSetup): void {
|
|||
usageCollection = _usageCollection;
|
||||
}
|
||||
|
||||
export function trackUiMetric(metricType: UiStatsMetricType, name: string) {
|
||||
export function trackUiMetric(metricType: UiCounterMetricType, name: string) {
|
||||
if (!usageCollection) {
|
||||
return;
|
||||
}
|
||||
const { reportUiStats } = usageCollection;
|
||||
reportUiStats(UIM_APP_NAME, metricType, name);
|
||||
const { reportUiCounter } = usageCollection;
|
||||
reportUiCounter(UIM_APP_NAME, metricType, name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue