newrelic / nr1-observability-maps

NR1 Observability Maps allows you to create an observability map based on any of the data available in New Relic.
https://discuss.newrelic.com/t/nr1-observability-maps-nerdpack/93091
Apache License 2.0
12 stars 11 forks source link

Entities disappear from observability map when unchecked #61

Closed twcallaghan closed 3 years ago

twcallaghan commented 3 years ago

Description

I have many entities that are connected in the observability map. I was playing around with the observability map the other day when I unchecked a connection from a browser connection to an APM that had other connections to nodes on the map and the unchecked node was completely removed. Basically: -----> O (2)

O (1) --> O (3)

I unchecked 1 in the menu of connected entities from 2. 1 is also connected to 3 so it has data being sent somewhere else. Regardless, when 1 was unchecked, it was removed from the map entirely.

Steps to Reproduce

In the example, 1 was a browser application and 3 was a custom node that is only there for visuals. 2 is an APM node that had a connection with 1 too. Uncheck 1 from the connected entities menu of 2.

Expected Behaviour

Node 1 should not be removed from the map when unchecked. Regardless if it has connections that are sending or receiving data, it shouldn't be removed from the map in the event it is unchecked from the "connected entities" menu.

Your Environment

Browser name and version: Google Chrome Version 89.0.4389.72 Operating System and version: Windows 10 Enterprise Version 1909

aswanson-nr commented 3 years ago

Closed by accident. Should be back to normal now.

aswanson-nr commented 3 years ago

After an initial investigation the issue appears to come from https://github.com/newrelic/nr1-observability-maps/blob/main/nerdlets/observability-maps-nerdlet/components/sidebar/connections.js#L40, lines 40 and 41. Upon unselecting a connection between two nodes, those two lines remove the node from the map. However, checking one of these connections adds a node to the map if it does not already exist, so we need to decide what behavior is appropriate during removal.

Options:

  1. Removing a connection does not remove nodes from the map regardless of how the node was originally added to the map.
  2. Removing a connection does not remove nodes from the map unless they were added by selecting the connection in the first place.

@jpvajda The first option is the least amount of work.

jpvajda commented 3 years ago

@aswanson-nr I honestly don't know enough about this application to make a product decision about the experience, so I'll ask @Kav91 to weigh in here, he's the largest contributor to this repo so perhaps he has an educated opinion 😄

twcallaghan commented 3 years ago

@Kav91 We meet again!

For my organization's use case, either choice would be extremely useful. Thanks for the followup!

Kav91 commented 3 years ago

Hi again @twcallaghan 👋

@aswanson-nr Thanks for the investigation!

  1. would be hard because we obviously aren't tracking how they were added. So 1. would be a both a viable and easy option.

Edit: Perhaps on 1, we could pop out the side modal to prompt would you like to remove surrounding nodes as well or just this singular node.

twcallaghan commented 3 years ago

@Kav91 I was wondering if there was an update on which direction will be taken on this issue and if there's a possible timeline for when it will be changing? Thanks, and I really appreciate all the work that you and everyone else is doing for this!

Kav91 commented 3 years ago

@twcallaghan was just discussed this morning. Will be picking it up next week.

Kav91 commented 3 years ago

@twcallaghan Was looking at this closer, so this wasn't a bug it was per design. But I understand the situation and frustration.

To resolve this I did the following PR -> https://github.com/newrelic/nr1-observability-maps/pull/65

When unchecking from the connected services menu a modal prompt will come out from the right side where you can select what you would like to do.

image

I'll submit the catalog update shortly, so perhaps end of week best case else next for it to be updated globally.

twcallaghan commented 3 years ago

@Kav91 Wow! That's an awesome workaround! Thanks so much for the quick work on this and great support by you and the whole observability maps team!

Kav91 commented 3 years ago

@twcallaghan the catalog has just been updated https://github.com/newrelic/nr1-catalog/pull/235 so the changes should be reflected shortly.

I'll close the issue now, if there are any problems with the update feel free to comment and re-open it.

Thanks!

twcallaghan commented 3 years ago

@Kav91 Awesome change! I did find one bug though. The issue is with re-adding a link and having a node move to a new location.

To replicate: Open up a node's connected entities. Click to remove one of its currently connected entities. Select "remove link". Then recheck this entity to form a new link. The now re-connected node will move locations from where it was when the link was removed. It is moved to the location that it spawns from when a node originally isn't connected and you click to make the node and link appear.

Pictures to help demonstrate what I mean: This is the original positions of the two nodes (parent and child if you will) image When you remove the link between these, nothing happens other than the link being removed. Perfect!

Then you click to re-link the child node in the parent node's connected entities and this is what it looks like after. image The arrow pretty clearly displays the node moving. Sorry for having to redact the large majority of info, it's all from my org's info so it is the best I can do!

Thanks again, it's a fairly minor issue, and I seriously appreciate the effort and turnaround on the original issue!

twcallaghan commented 3 years ago

@Kav91 Today is my last day at the organization that I'm with so I wanted to ping you one more time to please reopen this issue.

I hope all is well with you and best of luck in the future! Thanks so much for helping me with the issues you have before, they were some of my first issues I've raised on a project like this.