Skip to content

Commit dca668b

Browse files
committed
use es client provided from start contract
1 parent 4ba952f commit dca668b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • x-pack/plugins/apm/server/lib/apm_telemetry

x-pack/plugins/apm/server/lib/apm_telemetry/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ export async function createApmTelemetry({
5757

5858
const collectAndStore = async () => {
5959
const config = await config$.pipe(take(1)).toPromise();
60-
const esClient = core.elasticsearch.dataClient;
60+
const [{ elasticsearch }] = await core.getStartServices();
61+
const esClient = elasticsearch.legacy.client;
6162

6263
const indices = await getApmIndices({
6364
config,

0 commit comments

Comments
 (0)