Copyright (c) 2017 Ilya Khaprov <[email protected]>.
Version: 0.1.7
Cowboy 1:
Routes = [
{'_', [
{"/metrics/[:registry]", prometheus_cowboy1_handler, []},
{"/", toppage_handler, []}
]}
]
Cowboy 2:
Routes = [
{'_', [
{"/metrics/[:registry]", prometheus_cowboy2_handler, []},
{"/", toppage_handler, []}
]}
]
{ok, _} = cowboy:start_clear(http, [{port, 0}],
#{env => #{dispatch => Dispatch},
metrics_callback => fun prometheus_cowboy2_instrumenter:observe/1,
stream_handlers => [cowboy_metrics_h, cowboy_stream_h]})
Section order:
- Types
- Macros
- Callbacks
- Public API
- Deprecations
- Private Parts
Install the git
pre-commit hook:
./bin/pre-commit.sh install
The pre-commit check can be skipped by passing --no-verify
to git commit
.
MIT
prometheus_cowboy |
prometheus_cowboy1_handler |
prometheus_cowboy2_handler |
prometheus_cowboy2_instrumenter |