Observability & APM do not use elasticsearch client provided via setup contract (#67263)
* dump prettier version to v2 * use elasticserch client provided via context * use es client provided from start contract
This commit is contained in:
parent
c508140c95
commit
cec99f9c49
3 changed files with 4 additions and 3 deletions
|
@ -57,7 +57,8 @@ export async function createApmTelemetry({
|
|||
|
||||
const collectAndStore = async () => {
|
||||
const config = await config$.pipe(take(1)).toPromise();
|
||||
const esClient = core.elasticsearch.dataClient;
|
||||
const [{ elasticsearch }] = await core.getStartServices();
|
||||
const esClient = elasticsearch.legacy.client;
|
||||
|
||||
const indices = await getApmIndices({
|
||||
config,
|
||||
|
|
|
@ -39,7 +39,7 @@ export async function bootstrapAnnotations({ index, core, context }: Params) {
|
|||
getScopedAnnotationsClient: (requestContext: RequestHandlerContext, request: KibanaRequest) => {
|
||||
return createAnnotationsClient({
|
||||
index,
|
||||
apiCaller: core.elasticsearch.dataClient.asScoped(request).callAsCurrentUser,
|
||||
apiCaller: requestContext.core.elasticsearch.dataClient.callAsCurrentUser,
|
||||
logger,
|
||||
license: requestContext.licensing?.license,
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export function registerAnnotationAPIs({
|
|||
});
|
||||
}
|
||||
|
||||
const apiCaller = core.elasticsearch.dataClient.asScoped(request).callAsCurrentUser;
|
||||
const apiCaller = context.core.elasticsearch.dataClient.callAsCurrentUser;
|
||||
|
||||
const client = createAnnotationsClient({
|
||||
index,
|
||||
|
|
Loading…
Reference in a new issue