mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Fix visualize and lens telemetry (#67749)
This commit is contained in:
parent
96ef01828c
commit
6a8b07fe8e
2 changed files with 5 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
import { APICaller, CoreSetup, Logger } from 'kibana/server';
|
||||
import { Observable } from 'rxjs';
|
||||
import { first } from 'rxjs/operators';
|
||||
import moment from 'moment';
|
||||
import {
|
||||
RunContext,
|
||||
|
@ -191,7 +192,7 @@ export function telemetryTaskRunner(
|
|||
|
||||
return {
|
||||
async run() {
|
||||
const kibanaIndex = (await config.toPromise()).kibana.index;
|
||||
const kibanaIndex = (await config.pipe(first()).toPromise()).kibana.index;
|
||||
|
||||
return Promise.all([
|
||||
getDailyEvents(kibanaIndex, callCluster),
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
import { Observable } from 'rxjs';
|
||||
import _, { countBy, groupBy, mapValues } from 'lodash';
|
||||
import { first } from 'rxjs/operators';
|
||||
|
||||
import { APICaller, IClusterClient } from 'src/core/server';
|
||||
import { getNextMidnight } from '../../get_next_midnight';
|
||||
import { TaskInstance } from '../../../../../task_manager/server';
|
||||
|
@ -80,7 +82,7 @@ export function visualizationsTaskRunner(
|
|||
let error;
|
||||
|
||||
try {
|
||||
const index = (await config.toPromise()).kibana.index;
|
||||
const index = (await config.pipe(first()).toPromise()).kibana.index;
|
||||
stats = await getStats((await esClientPromise).callAsInternalUser, index);
|
||||
} catch (err) {
|
||||
if (err.constructor === Error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue