https://github.com/qgadrian/metadata_plugs
Elixir plugs to provide metadata information
https://github.com/qgadrian/metadata_plugs
elixir-plug health-plug metadata-information plug
Last synced: 3 months ago
JSON representation
Elixir plugs to provide metadata information
- Host: GitHub
- URL: https://github.com/qgadrian/metadata_plugs
- Owner: qgadrian
- License: mit
- Created: 2018-03-08T15:15:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T11:30:54.000Z (7 months ago)
- Last Synced: 2025-04-14T19:07:39.343Z (6 months ago)
- Topics: elixir-plug, health-plug, metadata-information, plug
- Language: Elixir
- Size: 47.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](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.2"}]
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")
```