Enable/Disable Endpoint should show duration
See original GitHub issueIssue Description
Both if it were disable and if it is still active. Seeing something like: durationMinutes: 180
makes for some simple math so the caller doesn’t have to worry about when something was enabled (regardless of timezone).
Duration Is probably a poor name. minutesActive
might be clearer. It would keep counting up if it hasn’t been disabled.
Feel free to ignore this idea though if it distracts from the endpoint’s purpose.
_Originally posted by @checketts in https://github.com/codecentric/chaos-monkey-spring-boot/issues/246#issuecomment-890033899_
Issue Analytics
- State:
- Created 2 years ago
- Comments:19 (15 by maintainers)
Top Results From Across the Web
Enable and Disable Endpoints at Runtime With Spring Boot
In this tutorial, we'll learn to enable and disable endpoints at runtime in a Spring Boot application using a few popular libraries, ...
Read more >Enable and disable endpoints at runtime with Spring boot
Now if you want the above controller to work, you need to add following in application.properties file. my.controller.enabled=true.
Read more >51. Endpoints - Spring
Each individual endpoint can be enabled or disabled. This controls whether or not the endpoint is created and its bean exists in the...
Read more >Manage endpoints in Azure Traffic Manager - Microsoft Learn
This article will help you add, remove, enable and disable endpoints from Azure Traffic Manager.
Read more >Spring Boot Actuator: Health check, Auditing, Metrics ...
It will show DOWN if the application gets unhealthy due to any issue like ... You can enable or disable an actuator endpoint...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
To fix the failing test, it looks like it works fine if you convert it to millis:
I not particularly opposed to the Duration in the ednpoint. More just annoyed with its
toString()
in general. 😉 So feel free to ignore my comment in that regard.However, if you were curious, here is how you could change the DTO:
And the test:
I’m not a huge fan of the Duration.toString(). It never is very intuitive for me. A simple method to write out a decimal of total second/minutes/hours wouldn’t take much and would make it much easier to read.