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

Fix service map for All environment single service #93517

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

smith
Copy link
Contributor

@smith smith commented Mar 3, 2021

Before we removed environment from the UI filters (#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes #93385.

Before we removed environment from the UI filters (elastic#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes elastic#93385.
@smith smith added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.12.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Mar 3, 2021
@smith smith requested a review from a team as a code owner March 3, 2021 21:32
@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Mar 3, 2021
@elasticmachine
Copy link
Contributor

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

@ogupte
Copy link
Contributor

ogupte commented Mar 3, 2021

Looking good! I'm wondering if all the instances where we check environment || environment === ENVIRONMENT_ALL.value be using shared logic, or if it's simple enough to just keep it like it is. What do you think?
Screen Shot 2021-03-03 at 5 07 10 PM

@smith
Copy link
Contributor Author

smith commented Mar 3, 2021

Looking good! I'm wondering if all the instances where we check environment || environment === ENVIRONMENT_ALL.value be using shared logic, or if it's simple enough to just keep it like it is. What do you think?

Almost all of those are in the alert creation, where environment is not coming directly from useUrlParams. Everywhere else (not sure about the one in EnvironmentFilter) we don't need to check because it comes from useUrlParams.

I agree though it probably should be even more centralized, I just probably won't do it here.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

@smith smith merged commit 4e21fae into elastic:master Mar 3, 2021
@smith smith deleted the nls/map-env-fix branch March 3, 2021 23:31
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 3, 2021
Before we removed environment from the UI filters (elastic#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes elastic#93385.
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.12 / #93534

Successful backport PRs will be merged automatically after passing CI.

smith added a commit to smith/kibana that referenced this pull request Mar 3, 2021
Before we removed environment from the UI filters (elastic#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes elastic#93385.
kibanamachine added a commit that referenced this pull request Mar 4, 2021
Before we removed environment from the UI filters (#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes #93385.

Co-authored-by: Nathan L Smith <[email protected]>
smith added a commit that referenced this pull request Mar 4, 2021
Before we removed environment from the UI filters (#89647), the environment query parameter would be undefined if "All" was selected. Now we send ENVIRONMENT_ALL in as the query parameter.

Changes in https://github.com/elastic/kibana/blob/master/x-pack/plugins/apm/server/lib/service_map/get_service_map_from_trace_ids.ts made it so no connections would be returned if ENVIRONMENT_ALL was selected, rather than all connections. Since no connections were being returned, no elements except the selected service would be returned in the API response.

This changes it so if ENVIRONMENT_ALL is selected, the connection will always be returned, just like what used to be the case when environment was undefined.

Add an API test for this case.

Fixes #93385.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 4, 2021
* master: (48 commits)
  Fix wrong import in data plugin causing 100kB bundle increase (elastic#93448)
  [Fleet] Correctly track install status of an integration (elastic#93464)
  Reviews data frame analytics UI text (elastic#93033)
  Display multiple copyable fields for process.args in resolver node detail panel (elastic#93280)
  [Security Solution][Detections] ML Popover overflow fix (elastic#93525)
  chore(NA): do not use execa on bazel workspace status update script (elastic#93532)
  Bump dependencies (elastic#93511)
  [dev/build_ts_refs] support disabling the ts-refs build completely (elastic#93529)
  [Security Solution] fix data provider cypress test (elastic#93465)
  Fix service map for All environment single service (elastic#93517)
  [Fleet] Fix package version comparaison in the UI (elastic#93498)
  [alerting] adds doc on JSON-expanded action variables and task manager max_workers (elastic#92720)
  [dev/build_ts_refs] ignore type checking failures when building ts refs (elastic#93473)
  [core-new-docs] Adds a dev-doc for core documentation (elastic#92976)
  remove opacity from maps legacy style (elastic#93456)
  [Security Solution][Lists] Escape quotes in list ids and quote the id in KQL query (elastic#93176)
  Revert "Make tests deterministic by providing unique timestamps (elastic#93350)"
  [Discover] Fix link from dashboard saved search to Discover (elastic#92937)
  update public api docs
  App Search - Polishing Analytics Views (elastic#92939)
  ...
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 release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Bug: Service map for a selected service won't show unless you select the service.environment
4 participants