Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM][RUM] adjust data types for uiFilters and range in APM requests #99257

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented May 4, 2021

Summary

Fixes elastic/uptime-dev#56

This PR adjusts data type for the query in has_rum_data route.

This is primarily to resolve issues with the hasRumData route, the params for which can be entirely undefined.

const rumHasDataRoute = createApmServerRoute({
  endpoint: 'GET /api/apm/observability_overview/has_rum_data',
  params: t.partial({
    query: t.intersection([uiFiltersRt, rangeRt]),
  }),
  options: { tags: ['access:apm'] },
  handler: async (resources) => {
    const setup = await setupRequest(resources);
    return await hasRumData({ setup });
  },
});

In particular, the exploratory view uses this api route to dynamically fetch apm indicies, without passing any params. This caused the error Invalid value undefined supplied to : strict_keys/0: Partial<{ query: ({ uiFilters: string } & { start: isoToEpochRt, end: isoToEpochRt }) }>/query: ({ uiFilters: string } & { start: isoToEpochRt, end: isoToEpochRt })/0: { uiFilters: string }/uiFilters: string when debug settings were applied.

To test
For APM exploratory view data, it's best to point your local kibana to edge ES.
In the advanced settings, turn Observability debug on
image
Navigate to exploratory view using the "Analyze Data" button in User Experience or Uptime
Select the data type as "User Experience (RUM)".
Ensure that the two report types "KPI over time" and "Performance Distribution" appear, and that there are no errors from api calls in the network tab.
Screen Shot 2021-05-04 at 4 36 13 PM

This API is also used by the Observability Overview page UX section. We should also smoke test that section to make sure it's still working.

[ ] Observability Overview UX page is still working in both debug and regular mode
[ ] Exploratory View "User Experience (RUM)" data type works in both debug and regular mode

@dominiqueclarke dominiqueclarke added bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability release_note:skip Skip the PR/issue when compiling release notes v7.14.0 v7.13.0 auto-backport Deprecated - use backport:version if exact versions are needed labels May 4, 2021
@dominiqueclarke dominiqueclarke requested review from a team as code owners May 4, 2021 20:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke
Copy link
Contributor Author

@elasticmachine merge upstream

@dominiqueclarke dominiqueclarke changed the title [APM] adjust data types for uiFilters and range in APM requests [APM][RUM] adjust data types for uiFilters and range in APM requests May 12, 2021
@dominiqueclarke dominiqueclarke marked this pull request as draft May 12, 2021 16:22
@dominiqueclarke dominiqueclarke force-pushed the fix/56-uptime-adjust-data-types-for-has-rum-data-api-call branch from 2138cfa to 0d334c8 Compare May 12, 2021 19:56
@dominiqueclarke dominiqueclarke force-pushed the fix/56-uptime-adjust-data-types-for-has-rum-data-api-call branch from 8df7d80 to 9eed989 Compare May 14, 2021 13:12
@dominiqueclarke dominiqueclarke marked this pull request as ready for review May 14, 2021 13:20
@dominiqueclarke
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 4 2 -2
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 5 3 -2
licensing 18 15 -3
monitoring 109 56 -53
total -73

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dominiqueclarke dominiqueclarke merged commit 4674762 into elastic:master May 14, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request May 14, 2021
…lastic#99257)

* update has_rum_data api query types

Co-authored-by: Kibana Machine <[email protected]>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request May 14, 2021
…lastic#99257)

* update has_rum_data api query types

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.13
7.x

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request May 14, 2021
…99257) (#100152)

* update has_rum_data api query types

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Dominique Clarke <[email protected]>
kibanamachine added a commit that referenced this pull request May 14, 2021
…99257) (#100151)

* update has_rum_data api query types

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Dominique Clarke <[email protected]>
@dominiqueclarke dominiqueclarke deleted the fix/56-uptime-adjust-data-types-for-has-rum-data-api-call branch May 14, 2021 20:49
yctercero pushed a commit to yctercero/kibana that referenced this pull request May 25, 2021
…lastic#99257)

* update has_rum_data api query types

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.13.0 v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants