[](https://coveralls.io/github/qgadrian/metadata_plugs?branch=master)
[](https://hex.pm/packages/metadata_plugs)
[](https://hexdocs.pm/metadata_plugs)
[](https://travis-ci.org/qgadrian/metadata_plugs)
[](https://beta.hexfaktor.org/github/qgadrian/metadata_plugs)
# MetadataPlugs
Collection of plugs to provide different metadata information.
[Plugs included](#plugs):
- [Health](#health)
- [Info](#info)
## Installation
Add to dependencies
```elixir
def deps do
[{:metadata_plugs, "~> 0.3.3"}]
end
```
Install dependencies
```bash
mix deps.get
```
## Plugs
### Health
Just add the plug to the endpoint file
```elixir
plug(MetadataPlugs.Health)
```
Default path for this plug is `/health`, which can be overwritten:
```elixir
plug(MetadataPlugs.Health, path: "/healthz")
```
### Info
Add the plug to the endpoint file with the desired environment variables to get the info from.
```elixir
plug(MetadataPlugs.Info, env_vars: ["APP_VERSION", "ENVIRONMENT"])
```
Default path for this plug is `/info`, which can be overwritten:
```elixir
plug(MetadataPlugs.Info, path: "/infoz")
```