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 - Services Map] page error when clicking Service Map's arrow #186101

Closed
devcorpio opened this issue Jun 12, 2024 · 4 comments · Fixed by #186597
Closed

[APM - Services Map] page error when clicking Service Map's arrow #186101

devcorpio opened this issue Jun 12, 2024 · 4 comments · Fixed by #186597
Labels
apm:service-maps Service Map feature in APM apm:ux bug Fixes for quality problems that affect the customer experience sdh-linked Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team

Comments

@devcorpio
Copy link
Contributor

Kibana version: tested with 8.13.4

Describe the bug:

When clicking on a service map arrow that looks like the one from the screenshot below:

Screenshot

Kibana throws an uncaught exception ("cannot read properties of undefined (reading 'service.name') and shows up this way:

Screenshot

There is an SDH associated with this. There you can find the reasons why it's failing. To avoid duplication, please, check the SDH that you will see below to see details.

Don't hesitate to ping me if more details are needed

@devcorpio devcorpio added bug Fixes for quality problems that affect the customer experience apm:ux Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Jun 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@smith smith added apm:service-maps Service Map feature in APM sdh-linked labels Jun 12, 2024
@mykolaharmash mykolaharmash self-assigned this Jun 20, 2024
@mykolaharmash
Copy link
Contributor

@sorenlouv maybe you have more context about this?

I see in group_resource_nodes.ts we make a list of groupedEdges that have only source and target but no sourceData and targetData. And when user clicks on the arrow in the service map for grouped resources, the popover receives exactly this structure and tries to render <EdgeContents> component where it crashes because of the missing sourceData property.

There is might be some logic missing in popover/index.tsx to handle this case. But I'm not sure what is the expected result, what kind of popover user would expect to see?

Would appreciate any additional context 🙌

@mykolaharmash mykolaharmash removed their assignment Jun 20, 2024
@sorenlouv
Copy link
Member

When clicking on an edge I think we should show the RED metrics between those two nodes - I can't remember if that's what we are actually doing today.

@smith
Copy link
Contributor

smith commented Jun 21, 2024

When clicking on an edge I think we should show the RED metrics between those two nodes - I can't remember if that's what we are actually doing today.

It's not. We have a button linking to traces for a single edge, and there was a bug for a compound edge, which currently should show nothing. That bug is fixed in #186597.

There's still an open issue from a long time ago about showing metrics between edges: #52870.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jun 24, 2024
Closes elastic/sdh-apm#1378
Closes elastic#186101

## Summary

Looking at the code, it seems like use-case for showing popover on an
edge that leads into a grouped resources node was never supported, and
it's unclear what kind of content should be displayed in the popover in
that case.

So this change just prevents the crashing reported in SDH by disabling
popover on grouped edged. In case we want to support this use-case,
there should a product decision about the content to show in the
popover.

https://github.com/elastic/kibana/assets/793851/9a353843-fd70-4543-a0b3-2fb8293d497f

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 17b010c)
kibanamachine referenced this issue Jun 24, 2024
… (#186813)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[APM] Disable popover for grouped edges in Service Map
(#186597)](#186597)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Mykola
Harmash","email":"mykola.harmash@gmail.com"},"sourceCommit":{"committedDate":"2024-06-24T12:20:58Z","message":"[APM]
Disable popover for grouped edges in Service Map (#186597)\n\nCloses
https://github.com/elastic/sdh-apm/issues/1378\r\nCloses
https://github.com/elastic/kibana/issues/186101\r\n\r\n##
Summary\r\n\r\nLooking at the code, it seems like use-case for showing
popover on an\r\nedge that leads into a grouped resources node was never
supported, and\r\nit's unclear what kind of content should be displayed
in the popover in\r\nthat case.\r\n\r\nSo this change just prevents the
crashing reported in SDH by disabling\r\npopover on grouped edged. In
case we want to support this use-case,\r\nthere should a product
decision about the content to show in
the\r\npopover.\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/9a353843-fd70-4543-a0b3-2fb8293d497f\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17b010c603d3e364a75cba1472a7179dea647aa3","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.15.0"],"title":"[APM]
Disable popover for grouped edges in Service
Map","number":186597,"url":"https://github.com/elastic/kibana/pull/186597","mergeCommit":{"message":"[APM]
Disable popover for grouped edges in Service Map (#186597)\n\nCloses
https://github.com/elastic/sdh-apm/issues/1378\r\nCloses
https://github.com/elastic/kibana/issues/186101\r\n\r\n##
Summary\r\n\r\nLooking at the code, it seems like use-case for showing
popover on an\r\nedge that leads into a grouped resources node was never
supported, and\r\nit's unclear what kind of content should be displayed
in the popover in\r\nthat case.\r\n\r\nSo this change just prevents the
crashing reported in SDH by disabling\r\npopover on grouped edged. In
case we want to support this use-case,\r\nthere should a product
decision about the content to show in
the\r\npopover.\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/9a353843-fd70-4543-a0b3-2fb8293d497f\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17b010c603d3e364a75cba1472a7179dea647aa3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186597","number":186597,"mergeCommit":{"message":"[APM]
Disable popover for grouped edges in Service Map (#186597)\n\nCloses
https://github.com/elastic/sdh-apm/issues/1378\r\nCloses
https://github.com/elastic/kibana/issues/186101\r\n\r\n##
Summary\r\n\r\nLooking at the code, it seems like use-case for showing
popover on an\r\nedge that leads into a grouped resources node was never
supported, and\r\nit's unclear what kind of content should be displayed
in the popover in\r\nthat case.\r\n\r\nSo this change just prevents the
crashing reported in SDH by disabling\r\npopover on grouped edged. In
case we want to support this use-case,\r\nthere should a product
decision about the content to show in
the\r\npopover.\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/9a353843-fd70-4543-a0b3-2fb8293d497f\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"17b010c603d3e364a75cba1472a7179dea647aa3"}}]}]
BACKPORT-->

Co-authored-by: Mykola Harmash <mykola.harmash@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:service-maps Service Map feature in APM apm:ux bug Fixes for quality problems that affect the customer experience sdh-linked Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team
Projects
None yet
5 participants