Flask-MonitoringDashboard icon indicating copy to clipboard operation
Flask-MonitoringDashboard copied to clipboard

Detecting that an Endpoint has been renamed

Open mircealungu opened this issue 7 years ago • 3 comments

It would be nice if the history of an endpoint that was renamed would not be lost, but rather, the rename would be detected and taken into account in the UI and in the analysis.

I wonder how difficult this would be.

Two challenges I see:

  • identifying that it's a rename and not a delete + new addition (could be done based on source code analysis, or even based on traces... etc.)
  • finding a good way to display this in the UI... and maybe also asking the user to confirm to make sure that it's not a confusion

Finally, the easy solution would be to let the user add some extra configuration for this.

mircealungu avatar Feb 21 '18 14:02 mircealungu

Maybe, this is possible using the git-data, as git keeps track of the changes

FlyingBird95 avatar Feb 21 '18 18:02 FlyingBird95

The short version: rename = delete + add (as pointed above). You can however try to detect it by identifying the pattern of events in the log, but it then it needs to be combined with tracing to the source code = headache in case more than one endpoints are renamed in one commit. Better to allow the user to pin deleted endpoints to currently monitored endpoints in the main configuration screen (e.g. through a dropbox showing "orphan" endpoints from the DB that do not correspond to functions in the code any more) and aggregate the data for the visualization. How difficult would that be?

On Wed, Feb 21, 2018 at 7:01 PM, Patrick Vogel [email protected] wrote:

Maybe, this is possible using the git-data, as git keeps track of the changes

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/flask-dashboard/Flask-Monitoring-Dashboard/issues/55#issuecomment-367414975, or mute the thread https://github.com/notifications/unsubscribe-auth/AJkLZDvpgRTaG_x5xpKjpkPILZDUHGLIks5tXFnmgaJpZM4SNwEz .

vandriko avatar Feb 22 '18 13:02 vandriko

I very much like the idea with the "orphan" endpoints. The dev can then confirm if an endpoint is deleted vs. an endpoint being the predecessor of another one. It can even provide suggestions among the endpoints that were introduced after the orphan disappeared from the code!

mircealungu avatar Feb 22 '18 14:02 mircealungu