[APM][RUM] adjust data types for uiFilters and range in APM requests (#99257)
* update has_rum_data api query types Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
2ba09e446f
commit
4674762657
|
@ -14,7 +14,11 @@ import { ProcessorEvent } from '../../../common/processor_event';
|
|||
import { rangeQuery } from '../../../server/utils/queries';
|
||||
import { TRANSACTION_PAGE_LOAD } from '../../../common/transaction_types';
|
||||
|
||||
export async function hasRumData({ setup }: { setup: Setup & SetupTimeRange }) {
|
||||
export async function hasRumData({
|
||||
setup,
|
||||
}: {
|
||||
setup: Setup & Partial<SetupTimeRange>;
|
||||
}) {
|
||||
try {
|
||||
const { start, end } = setup;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
import * as t from 'io-ts';
|
||||
import { jsonRt } from '@kbn/io-ts-utils';
|
||||
import { isoToEpochRt } from '@kbn/io-ts-utils';
|
||||
import { LocalUIFilterName } from '../../common/ui_filter';
|
||||
import {
|
||||
Setup,
|
||||
|
@ -264,7 +265,11 @@ const rumJSErrors = createApmServerRoute({
|
|||
const rumHasDataRoute = createApmServerRoute({
|
||||
endpoint: 'GET /api/apm/observability_overview/has_rum_data',
|
||||
params: t.partial({
|
||||
query: t.intersection([uiFiltersRt, rangeRt]),
|
||||
query: t.partial({
|
||||
uiFilters: t.string,
|
||||
start: isoToEpochRt,
|
||||
end: isoToEpochRt,
|
||||
}),
|
||||
}),
|
||||
options: { tags: ['access:apm'] },
|
||||
handler: async (resources) => {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import { QueryContainer } from '@elastic/elasticsearch/api/types';
|
||||
import { esKuery } from '../../../../../src/plugins/data/server';
|
||||
|
||||
export function rangeQuery(start: number, end: number, field = '@timestamp'): QueryContainer[] {
|
||||
export function rangeQuery(start?: number, end?: number, field = '@timestamp'): QueryContainer[] {
|
||||
return [
|
||||
{
|
||||
range: {
|
||||
|
|
Loading…
Reference in a new issue