Skip to content

Commit

Permalink
[APM] Added required fields to infra metrics client (elastic#142569)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
2 people authored and WafaaNasr committed Oct 14, 2022
1 parent 8aed554 commit bfc7460
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export async function getContainerHostNames({

const response = await infraMetricsClient.search({
size: 0,
track_total_hits: false,
query: {
bool: {
filter: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const getServiceInstanceContainerMetadata = async ({

const response = await infraMetricsClient.search({
size: 1,
track_total_hits: false,
query: {
bool: {
filter: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const getServiceOverviewContainerMetadata = async ({

const response = await infraMetricsClient.search({
size: 0,
track_total_hits: false,
query: {
bool: {
filter: [
Expand Down

0 comments on commit bfc7460

Please sign in to comment.