From b65a506361120b22319f4de13f321456c28d8701 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Mon, 11 Oct 2021 20:03:31 +0200 Subject: [PATCH] [Observability] Move InspectContextProvider and utils to observability (#113842) (#114456) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- x-pack/plugins/apm/kibana.json | 1 - .../plugins/apm/public/application/uxApp.tsx | 6 +- .../RumDashboard/ActionMenu/inpector_link.tsx | 2 +- .../public/components/routing/app_root.tsx | 6 +- .../inspector_header_link.tsx | 6 +- .../plugins/apm/public/hooks/use_fetcher.tsx | 2 +- .../public/services/rest/createCallApmApi.ts | 2 +- .../create_es_client/call_async_with_debug.ts | 2 +- .../server/routes/register_routes/index.ts | 2 +- x-pack/plugins/apm/typings/common.d.ts | 3 - x-pack/plugins/observability/kibana.json | 1 + .../filter_value_label/filter_value_label.tsx | 7 +- .../public/components/shared/index.tsx | 11 +++ .../context/inspector/inspector_context.tsx | 11 +-- .../inspector/use_inspector_context.tsx | 0 .../public/hooks/use_fetcher.tsx | 1 + x-pack/plugins/observability/public/index.ts | 5 +- x-pack/plugins/observability/server/index.ts | 1 + .../server/utils}/get_inspect_response.ts | 86 +++++++------------ .../plugins/observability/typings/common.ts | 4 + 20 files changed, 79 insertions(+), 80 deletions(-) rename x-pack/plugins/{apm => observability}/public/context/inspector/inspector_context.tsx (91%) rename x-pack/plugins/{apm => observability}/public/context/inspector/use_inspector_context.tsx (100%) rename x-pack/plugins/{apm/server/lib/helpers/create_es_client => observability/server/utils}/get_inspect_response.ts (55%) diff --git a/x-pack/plugins/apm/kibana.json b/x-pack/plugins/apm/kibana.json index a6eba1aada85c..4e82d82d655b4 100644 --- a/x-pack/plugins/apm/kibana.json +++ b/x-pack/plugins/apm/kibana.json @@ -13,7 +13,6 @@ "embeddable", "features", "infra", - "inspector", "licensing", "observability", "ruleRegistry", diff --git a/x-pack/plugins/apm/public/application/uxApp.tsx b/x-pack/plugins/apm/public/application/uxApp.tsx index 16f05cbd51a2c..7ffa285f35799 100644 --- a/x-pack/plugins/apm/public/application/uxApp.tsx +++ b/x-pack/plugins/apm/public/application/uxApp.tsx @@ -34,10 +34,12 @@ import { createCallApmApi } from '../services/rest/createCallApmApi'; import { createStaticIndexPattern } from '../services/rest/index_pattern'; import { UXActionMenu } from '../components/app/RumDashboard/ActionMenu'; import { redirectTo } from '../components/routing/redirect_to'; -import { useBreadcrumbs } from '../../../observability/public'; +import { + InspectorContextProvider, + useBreadcrumbs, +} from '../../../observability/public'; import { useApmPluginContext } from '../context/apm_plugin/use_apm_plugin_context'; import { APP_WRAPPER_CLASS } from '../../../../../src/core/public'; -import { InspectorContextProvider } from '../context/inspector/inspector_context'; export const uxRoutes: APMRouteDefinition[] = [ { diff --git a/x-pack/plugins/apm/public/components/app/RumDashboard/ActionMenu/inpector_link.tsx b/x-pack/plugins/apm/public/components/app/RumDashboard/ActionMenu/inpector_link.tsx index fe686d5571eb8..fc7fad24edb56 100644 --- a/x-pack/plugins/apm/public/components/app/RumDashboard/ActionMenu/inpector_link.tsx +++ b/x-pack/plugins/apm/public/components/app/RumDashboard/ActionMenu/inpector_link.tsx @@ -10,8 +10,8 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useKibana } from '../../../../../../../../src/plugins/kibana_react/public'; -import { useInspectorContext } from '../../../../context/inspector/use_inspector_context'; import { enableInspectEsQueries } from '../../../../../../observability/common/ui_settings_keys'; +import { useInspectorContext } from '../../../../../../observability/public'; export function UxInspectorHeaderLink() { const { inspector } = useApmPluginContext(); diff --git a/x-pack/plugins/apm/public/components/routing/app_root.tsx b/x-pack/plugins/apm/public/components/routing/app_root.tsx index bae41b055874a..bc4119a3e835a 100644 --- a/x-pack/plugins/apm/public/components/routing/app_root.tsx +++ b/x-pack/plugins/apm/public/components/routing/app_root.tsx @@ -17,7 +17,10 @@ import { RedirectAppLinks, useUiSetting$, } from '../../../../../../src/plugins/kibana_react/public'; -import { HeaderMenuPortal } from '../../../../observability/public'; +import { + HeaderMenuPortal, + InspectorContextProvider, +} from '../../../../observability/public'; import { ScrollToTopOnPathChange } from '../../components/app/Main/ScrollToTopOnPathChange'; import { AnomalyDetectionJobsContextProvider } from '../../context/anomaly_detection_jobs/anomaly_detection_jobs_context'; import { @@ -26,7 +29,6 @@ import { } from '../../context/apm_plugin/apm_plugin_context'; import { useApmPluginContext } from '../../context/apm_plugin/use_apm_plugin_context'; import { BreadcrumbsContextProvider } from '../../context/breadcrumbs/context'; -import { InspectorContextProvider } from '../../context/inspector/inspector_context'; import { LicenseProvider } from '../../context/license/license_context'; import { TimeRangeIdContextProvider } from '../../context/time_range_id/time_range_id_context'; import { UrlParamsProvider } from '../../context/url_params_context/url_params_context'; diff --git a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/inspector_header_link.tsx b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/inspector_header_link.tsx index 7f1848e76d28a..8a18bf0b3eed1 100644 --- a/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/inspector_header_link.tsx +++ b/x-pack/plugins/apm/public/components/shared/apm_header_action_menu/inspector_header_link.tsx @@ -9,9 +9,11 @@ import { EuiHeaderLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; -import { enableInspectEsQueries } from '../../../../../observability/public'; +import { + enableInspectEsQueries, + useInspectorContext, +} from '../../../../../observability/public'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { useInspectorContext } from '../../../context/inspector/use_inspector_context'; export function InspectorHeaderLink() { const { inspector } = useApmPluginContext(); diff --git a/x-pack/plugins/apm/public/hooks/use_fetcher.tsx b/x-pack/plugins/apm/public/hooks/use_fetcher.tsx index d5a10a6e91539..72fb8ac0bb3cf 100644 --- a/x-pack/plugins/apm/public/hooks/use_fetcher.tsx +++ b/x-pack/plugins/apm/public/hooks/use_fetcher.tsx @@ -9,12 +9,12 @@ import { i18n } from '@kbn/i18n'; import React, { useEffect, useMemo, useState } from 'react'; import { IHttpFetchError } from 'src/core/public'; import { useKibana } from '../../../../../src/plugins/kibana_react/public'; -import { useInspectorContext } from '../context/inspector/use_inspector_context'; import { useTimeRangeId } from '../context/time_range_id/use_time_range_id'; import { AutoAbortedAPMClient, callApmApi, } from '../services/rest/createCallApmApi'; +import { useInspectorContext } from '../../../observability/public'; export enum FETCH_STATUS { LOADING = 'loading', diff --git a/x-pack/plugins/apm/public/services/rest/createCallApmApi.ts b/x-pack/plugins/apm/public/services/rest/createCallApmApi.ts index 0dda1fc56dd27..388d88bbc2a92 100644 --- a/x-pack/plugins/apm/public/services/rest/createCallApmApi.ts +++ b/x-pack/plugins/apm/public/services/rest/createCallApmApi.ts @@ -28,7 +28,7 @@ import type { APIEndpoint, // eslint-disable-next-line @kbn/eslint/no-restricted-paths } from '../../../server'; -import { InspectResponse } from '../../../typings/common'; +import { InspectResponse } from '../../../../observability/typings/common'; export type APMClientOptions = Omit< FetchOptions, diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/call_async_with_debug.ts b/x-pack/plugins/apm/server/lib/helpers/create_es_client/call_async_with_debug.ts index b58a11f637c21..fb58357d68437 100644 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/call_async_with_debug.ts +++ b/x-pack/plugins/apm/server/lib/helpers/create_es_client/call_async_with_debug.ts @@ -12,7 +12,7 @@ import { KibanaRequest } from '../../../../../../../src/core/server'; import { RequestStatus } from '../../../../../../../src/plugins/inspector'; import { WrappedElasticsearchClientError } from '../../../../../observability/server'; import { inspectableEsQueriesMap } from '../../../routes/register_routes'; -import { getInspectResponse } from './get_inspect_response'; +import { getInspectResponse } from '../../../../../observability/server'; function formatObj(obj: Record) { return JSON.stringify(obj, null, 2); diff --git a/x-pack/plugins/apm/server/routes/register_routes/index.ts b/x-pack/plugins/apm/server/routes/register_routes/index.ts index fb1d67ad30c2b..d3587f1fcbe4b 100644 --- a/x-pack/plugins/apm/server/routes/register_routes/index.ts +++ b/x-pack/plugins/apm/server/routes/register_routes/index.ts @@ -21,7 +21,7 @@ import { mergeRt, jsonRt } from '@kbn/io-ts-utils'; import { pickKeys } from '../../../common/utils/pick_keys'; import { APMRouteHandlerResources, TelemetryUsageCounter } from '../typings'; import type { ApmPluginRequestHandlerContext } from '../typings'; -import { InspectResponse } from '../../../typings/common'; +import { InspectResponse } from '../../../../observability/typings/common'; const inspectRt = t.exact( t.partial({ diff --git a/x-pack/plugins/apm/typings/common.d.ts b/x-pack/plugins/apm/typings/common.d.ts index 4c0b8520924bc..b94eb6cd97b06 100644 --- a/x-pack/plugins/apm/typings/common.d.ts +++ b/x-pack/plugins/apm/typings/common.d.ts @@ -6,7 +6,6 @@ */ import type { UnwrapPromise } from '@kbn/utility-types'; -import type { Request } from '../../../../src/plugins/inspector/common'; import '../../../typings/rison_node'; import '../../infra/types/eui'; // EUIBasicTable @@ -28,5 +27,3 @@ type AllowUnknownObjectProperties = T extends object export type PromiseValueType> = UnwrapPromise; export type Maybe = T | null | undefined; - -export type InspectResponse = Request[]; diff --git a/x-pack/plugins/observability/kibana.json b/x-pack/plugins/observability/kibana.json index 07299f2e6ff1c..822e0cf9efe7c 100644 --- a/x-pack/plugins/observability/kibana.json +++ b/x-pack/plugins/observability/kibana.json @@ -23,6 +23,7 @@ "cases", "data", "features", + "inspector", "ruleRegistry", "timelines", "triggersActionsUi" diff --git a/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx b/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx index 9e7b96b02206f..9e8480107c17d 100644 --- a/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx +++ b/x-pack/plugins/observability/public/components/shared/filter_value_label/filter_value_label.tsx @@ -41,7 +41,7 @@ export function buildFilterLabel({ return filter; } -interface Props { +export interface FilterValueLabelProps { field: string; label: string; value: string | string[]; @@ -60,7 +60,7 @@ export function FilterValueLabel({ invertFilter, removeFilter, allowExclusion = true, -}: Props) { +}: FilterValueLabelProps) { const FilterItem = injectI18n(esFilters.FilterItem); const filter = buildFilterLabel({ field, value, label, indexPattern, negate }); @@ -92,3 +92,6 @@ export function FilterValueLabel({ /> ) : null; } + +// eslint-disable-next-line import/no-default-export +export default FilterValueLabel; diff --git a/x-pack/plugins/observability/public/components/shared/index.tsx b/x-pack/plugins/observability/public/components/shared/index.tsx index afc053604fcdf..4d841eaf4d724 100644 --- a/x-pack/plugins/observability/public/components/shared/index.tsx +++ b/x-pack/plugins/observability/public/components/shared/index.tsx @@ -9,6 +9,7 @@ import React, { lazy, Suspense } from 'react'; import { EuiLoadingSpinner } from '@elastic/eui'; import type { CoreVitalProps, HeaderMenuPortalProps } from './types'; import type { FieldValueSuggestionsProps } from './field_value_suggestions/types'; +import type { FilterValueLabelProps } from './filter_value_label/filter_value_label'; export { createLazyObservabilityPageTemplate } from './page_template'; export type { LazyObservabilityPageTemplateProps } from './page_template'; @@ -42,3 +43,13 @@ export function FieldValueSuggestions(props: FieldValueSuggestionsProps) { ); } + +const FilterValueLabelLazy = lazy(() => import('./filter_value_label/filter_value_label')); + +export function FilterValueLabel(props: FilterValueLabelProps) { + return ( + + + + ); +} diff --git a/x-pack/plugins/apm/public/context/inspector/inspector_context.tsx b/x-pack/plugins/observability/public/context/inspector/inspector_context.tsx similarity index 91% rename from x-pack/plugins/apm/public/context/inspector/inspector_context.tsx rename to x-pack/plugins/observability/public/context/inspector/inspector_context.tsx index 74a44b56ba07d..1d9bd95fa08fa 100644 --- a/x-pack/plugins/apm/public/context/inspector/inspector_context.tsx +++ b/x-pack/plugins/observability/public/context/inspector/inspector_context.tsx @@ -8,8 +8,8 @@ import React, { createContext, ReactNode, useEffect } from 'react'; import { useHistory } from 'react-router-dom'; import { RequestAdapter } from '../../../../../../src/plugins/inspector/common'; -import { InspectResponse } from '../../../typings/common'; import { FetcherResult } from '../../hooks/use_fetcher'; +import { InspectResponse } from '../../../typings/common'; export interface InspectorContextValue { addInspectorRequest: (result: FetcherResult) => void; @@ -23,11 +23,7 @@ const value: InspectorContextValue = { export const InspectorContext = createContext(value); -export function InspectorContextProvider({ - children, -}: { - children: ReactNode; -}) { +export function InspectorContextProvider({ children }: { children: ReactNode }) { const history = useHistory(); const { inspectorAdapters } = value; @@ -37,8 +33,7 @@ export function InspectorContextProvider({ _inspect?: InspectResponse; }> ) { - const operations = - result.data?._inspect ?? result.data?.mainStatisticsData?._inspect ?? []; + const operations = result.data?._inspect ?? result.data?.mainStatisticsData?._inspect ?? []; operations.forEach((operation) => { if (operation.response) { diff --git a/x-pack/plugins/apm/public/context/inspector/use_inspector_context.tsx b/x-pack/plugins/observability/public/context/inspector/use_inspector_context.tsx similarity index 100% rename from x-pack/plugins/apm/public/context/inspector/use_inspector_context.tsx rename to x-pack/plugins/observability/public/context/inspector/use_inspector_context.tsx diff --git a/x-pack/plugins/observability/public/hooks/use_fetcher.tsx b/x-pack/plugins/observability/public/hooks/use_fetcher.tsx index ab8263b086fcd..2defc9a640f95 100644 --- a/x-pack/plugins/observability/public/hooks/use_fetcher.tsx +++ b/x-pack/plugins/observability/public/hooks/use_fetcher.tsx @@ -12,6 +12,7 @@ export enum FETCH_STATUS { SUCCESS = 'success', FAILURE = 'failure', PENDING = 'pending', + NOT_INITIATED = 'not_initiated', } export interface FetcherResult { diff --git a/x-pack/plugins/observability/public/index.ts b/x-pack/plugins/observability/public/index.ts index 99ce1effef4b4..c5dd7f5c858ef 100644 --- a/x-pack/plugins/observability/public/index.ts +++ b/x-pack/plugins/observability/public/index.ts @@ -45,6 +45,7 @@ export { getCoreVitalsComponent, HeaderMenuPortal, FieldValueSuggestions, + FilterValueLabel, } from './components/shared/'; export type { LazyObservabilityPageTemplateProps } from './components/shared'; @@ -70,7 +71,6 @@ export { useTheme } from './hooks/use_theme'; export { getApmTraceUrl } from './utils/get_apm_trace_url'; export { createExploratoryViewUrl } from './components/shared/exploratory_view/configurations/utils'; export { ALL_VALUES_SELECTED } from './components/shared/field_value_suggestions/field_value_combobox'; -export { FilterValueLabel } from './components/shared/filter_value_label/filter_value_label'; export type { AllSeries } from './components/shared/exploratory_view/hooks/use_series_storage'; export type { SeriesUrl } from './components/shared/exploratory_view/types'; @@ -81,3 +81,6 @@ export type { } from './rules/create_observability_rule_type_registry'; export { createObservabilityRuleTypeRegistryMock } from './rules/observability_rule_type_registry_mock'; export type { ExploratoryEmbeddableProps } from './components/shared/exploratory_view/embeddable/embeddable'; + +export { InspectorContextProvider } from './context/inspector/inspector_context'; +export { useInspectorContext } from './context/inspector/use_inspector_context'; diff --git a/x-pack/plugins/observability/server/index.ts b/x-pack/plugins/observability/server/index.ts index 97a17b0d11153..53c3ecb23546c 100644 --- a/x-pack/plugins/observability/server/index.ts +++ b/x-pack/plugins/observability/server/index.ts @@ -15,6 +15,7 @@ import { createOrUpdateIndex, Mappings } from './utils/create_or_update_index'; import { ScopedAnnotationsClient } from './lib/annotations/bootstrap_annotations'; import { unwrapEsResponse, WrappedElasticsearchClientError } from './utils/unwrap_es_response'; export { rangeQuery, kqlQuery } from './utils/queries'; +export { getInspectResponse } from './utils/get_inspect_response'; export * from './types'; diff --git a/x-pack/plugins/apm/server/lib/helpers/create_es_client/get_inspect_response.ts b/x-pack/plugins/observability/server/utils/get_inspect_response.ts similarity index 55% rename from x-pack/plugins/apm/server/lib/helpers/create_es_client/get_inspect_response.ts rename to x-pack/plugins/observability/server/utils/get_inspect_response.ts index ae91daf9d2e0d..a6792e0cac5fd 100644 --- a/x-pack/plugins/apm/server/lib/helpers/create_es_client/get_inspect_response.ts +++ b/x-pack/plugins/observability/server/utils/get_inspect_response.ts @@ -6,13 +6,10 @@ */ import { i18n } from '@kbn/i18n'; -import type { KibanaRequest } from '../../../../../../../src/core/server'; -import type { - RequestStatistics, - RequestStatus, -} from '../../../../../../../src/plugins/inspector'; -import { WrappedElasticsearchClientError } from '../../../../../observability/server'; -import type { InspectResponse } from '../../../../typings/common'; +import type { KibanaRequest } from 'kibana/server'; +import type { RequestStatistics, RequestStatus } from '../../../../../src/plugins/inspector'; +import { WrappedElasticsearchClientError } from '../index'; +import { InspectResponse } from '../../typings/common'; /** * Get statistics to show on inspector tab. @@ -33,14 +30,11 @@ function getStats({ }) { const stats: RequestStatistics = { kibanaApiQueryParameters: { - label: i18n.translate( - 'xpack.apm.inspector.stats.kibanaApiQueryParametersLabel', - { - defaultMessage: 'Kibana API query parameters', - } - ), + label: i18n.translate('xpack.observability.inspector.stats.kibanaApiQueryParametersLabel', { + defaultMessage: 'Kibana API query parameters', + }), description: i18n.translate( - 'xpack.apm.inspector.stats.kibanaApiQueryParametersDescription', + 'xpack.observability.inspector.stats.kibanaApiQueryParametersDescription', { defaultMessage: 'The query parameters used in the Kibana API request that initiated the Elasticsearch request.', @@ -49,42 +43,33 @@ function getStats({ value: JSON.stringify(kibanaRequest.query, null, 2), }, kibanaApiRoute: { - label: i18n.translate('xpack.apm.inspector.stats.kibanaApiRouteLabel', { + label: i18n.translate('xpack.observability.inspector.stats.kibanaApiRouteLabel', { defaultMessage: 'Kibana API route', }), - description: i18n.translate( - 'xpack.apm.inspector.stats.kibanaApiRouteDescription', - { - defaultMessage: - 'The route of the Kibana API request that initiated the Elasticsearch request.', - } - ), - value: `${kibanaRequest.route.method.toUpperCase()} ${ - kibanaRequest.route.path - }`, + description: i18n.translate('xpack.observability.inspector.stats.kibanaApiRouteDescription', { + defaultMessage: + 'The route of the Kibana API request that initiated the Elasticsearch request.', + }), + value: `${kibanaRequest.route.method.toUpperCase()} ${kibanaRequest.route.path}`, }, indexPattern: { - label: i18n.translate('xpack.apm.inspector.stats.indexPatternLabel', { + label: i18n.translate('xpack.observability.inspector.stats.indexPatternLabel', { defaultMessage: 'Index pattern', }), value: esRequestParams.index, - description: i18n.translate( - 'xpack.apm.inspector.stats.indexPatternDescription', - { - defaultMessage: - 'The index pattern that connected to the Elasticsearch indices.', - } - ), + description: i18n.translate('xpack.observability.inspector.stats.indexPatternDescription', { + defaultMessage: 'The index pattern that connected to the Elasticsearch indices.', + }), }, }; if (esResponse?.hits) { stats.hits = { - label: i18n.translate('xpack.apm.inspector.stats.hitsLabel', { + label: i18n.translate('xpack.observability.inspector.stats.hitsLabel', { defaultMessage: 'Hits', }), value: `${esResponse.hits.hits.length}`, - description: i18n.translate('xpack.apm.inspector.stats.hitsDescription', { + description: i18n.translate('xpack.observability.inspector.stats.hitsDescription', { defaultMessage: 'The number of documents returned by the query.', }), }; @@ -92,21 +77,18 @@ function getStats({ if (esResponse?.took) { stats.queryTime = { - label: i18n.translate('xpack.apm.inspector.stats.queryTimeLabel', { + label: i18n.translate('xpack.observability.inspector.stats.queryTimeLabel', { defaultMessage: 'Query time', }), - value: i18n.translate('xpack.apm.inspector.stats.queryTimeValue', { + value: i18n.translate('xpack.observability.inspector.stats.queryTimeValue', { defaultMessage: '{queryTime}ms', values: { queryTime: esResponse.took }, }), - description: i18n.translate( - 'xpack.apm.inspector.stats.queryTimeDescription', - { - defaultMessage: - 'The time it took to process the query. ' + - 'Does not include the time to send the request or parse it in the browser.', - } - ), + description: i18n.translate('xpack.observability.inspector.stats.queryTimeDescription', { + defaultMessage: + 'The time it took to process the query. ' + + 'Does not include the time to send the request or parse it in the browser.', + }), }; } @@ -115,20 +97,16 @@ function getStats({ relation: string; value: number; }; - const hitsTotalValue = - total.relation === 'eq' ? `${total.value}` : `> ${total.value}`; + const hitsTotalValue = total.relation === 'eq' ? `${total.value}` : `> ${total.value}`; stats.hitsTotal = { - label: i18n.translate('xpack.apm.inspector.stats.hitsTotalLabel', { + label: i18n.translate('xpack.observability.inspector.stats.hitsTotalLabel', { defaultMessage: 'Hits (total)', }), value: hitsTotalValue, - description: i18n.translate( - 'xpack.apm.inspector.stats.hitsTotalDescription', - { - defaultMessage: 'The number of documents that match the query.', - } - ), + description: i18n.translate('xpack.observability.inspector.stats.hitsTotalDescription', { + defaultMessage: 'The number of documents that match the query.', + }), }; } return stats; diff --git a/x-pack/plugins/observability/typings/common.ts b/x-pack/plugins/observability/typings/common.ts index d6209c737a468..2bc95447d9203 100644 --- a/x-pack/plugins/observability/typings/common.ts +++ b/x-pack/plugins/observability/typings/common.ts @@ -5,6 +5,8 @@ * 2.0. */ +import { Request } from '../../../../src/plugins/inspector'; + export type ObservabilityApp = | 'infra_metrics' | 'infra_logs' @@ -22,3 +24,5 @@ export type PromiseReturnType = Func extends (...args: any[]) => Promise