[APM] Added required fields to infra metrics client (#142569)

* Added required fields to infra metrics client

* add fields to the requests

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Miriam 2022-10-05 15:07:53 +01:00 committed by GitHub
parent a6f013bc49
commit d3370cfd96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 1 deletions

View file

@ -9,7 +9,10 @@ import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types';
import { APMRouteHandlerResources } from '../../../../routes/typings';
import { getInfraMetricIndices } from '../../get_infra_metric_indices';
type InfraMetricsSearchParams = Omit<ESSearchRequest, 'index'>;
type InfraMetricsSearchParams = Omit<ESSearchRequest, 'index'> & {
size: number;
track_total_hits: boolean | number;
};
export type InfraMetricsClient = ReturnType<typeof createInfraMetricsClient>;

View file

@ -29,6 +29,7 @@ export async function getContainerHostNames({
const response = await infraMetricsClient.search({
size: 0,
track_total_hits: false,
query: {
bool: {
filter: [

View file

@ -51,6 +51,7 @@ export const getServiceInstanceContainerMetadata = async ({
const response = await infraMetricsClient.search({
size: 1,
track_total_hits: false,
query: {
bool: {
filter: [

View file

@ -43,6 +43,7 @@ export const getServiceOverviewContainerMetadata = async ({
const response = await infraMetricsClient.search({
size: 0,
track_total_hits: false,
query: {
bool: {
filter: [