ggpasqualino / plug_checkup Goto Github PK
View Code? Open in Web Editor NEWPlugCheckup provides a Plug for adding simple health checks to your app
License: MIT License
PlugCheckup provides a Plug for adding simple health checks to your app
License: MIT License
defp deps do
[
{:plug_checkup, "~> 0.1.0"}
]
end
should contain newest version of library
Add a test which goes through a plug router and checks whether the response is valid according to the json schema
Make the json response pretty formatted.
Add field pretty
to Options with default true
to be used on the encoding of the json response.
In the docs it says
Forward your health path to PlugCheckup in your Plug Router
forward "/health",
to: PlugCheckup,
init_opts: %PlugCheckup.Options{checks: checks}
This can be confusing when using Phoenix as the Phoenix.Router implements a different forward/4
function that takes a different set of arguments than forward/2
in Plug.Router.
Happy to add an example if you think it's worth it.
Validate the Options given to the plug, raise exception in case it is not, in order to avoid the application to start with wrong configuration.
Catch exit and errors besides rescuing exceptions
Not all exceptions have the field message
.
There should be a call to Exception.message/1
instead of checking the field message of the exception when running PlugCheckup.Check.safe_execute/1
I just wanted to ask about the maintenance status of this project: Is this library still actively maintained?
Otherwise, I would offer to further maintain this project.
forward "/health",
to: PlugCheckup,
init_opts: %PlugCheckup.Options{checks: [{MyHealthChecks, :check_db}, {MyHealthChecks, :check_redis}]}
the checks field should be a list of PlugCheckup.Check not a list of tuples
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.