-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the README #12
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
# Metrics API for [erldns](https://github.com/dnsimple/erldns) | ||
# Metrics API for [erldns] | ||
|
||
This app provides an HTTP API for gathering and querying metrics from an erldns server and presenting those metrics as JSON. | ||
This app provides an HTTP API for gathering and querying metrics from an [erldns] server and presenting those metrics as JSON. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
|
||
> [!NOTE] | ||
> erldns_metrics is architected to run in the *same Erlang VM* as erldns, as it reads metrics from the runtime. This is why erldns is a dependency of this library, and gets started in [`erldns_metrics.app.src`](./src/erldns_metrics.app.src): it's useful for local development, so that starting erldns_metrics also starts erldns. | ||
> In general, you might want to run erldns_metrics and erldns both as dependencies of an application that *you* control and deploy. | ||
|
||
Here's an example script that shows how to get the output with `curl` and pass it through Python to format it in a pretty fashion. It assumes you have this API running on port `8082`. | ||
|
||
|
@@ -13,16 +17,16 @@ curl -s http://localhost:8082/ -H "Accept: application/json" | python -mjson.too | |
|
||
## Configuration | ||
|
||
To configure the metrics API port, add something like the following to your Erlang configuration section: | ||
To run this application and configure erldns, add something like the following to your Erlang configuration section: | ||
|
||
```erlang | ||
[ | ||
{erldns,[ | ||
{erldns, [ | ||
{metrics, [ | ||
{port, 8082} | ||
]}, | ||
]} | ||
] | ||
]. | ||
``` | ||
|
||
## Building | ||
|
@@ -41,7 +45,7 @@ make fresh | |
|
||
## Running | ||
|
||
You'll need [erldns]() running. Then, you can run erldns_metrics as: | ||
You'll need [erldns] running. erldns_metrics starts it on startup, so you just need to run this in the erldns_metrics repository: | ||
|
||
```bash | ||
rebar3 shell | ||
|
@@ -77,3 +81,5 @@ rebar3 shell --config erldns_metrics.config | |
```bash | ||
make test | ||
``` | ||
|
||
[erldns]: https://github.com/dnsimple/erldns |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the link has been removed but we still keep the
[]
around was this intentional?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes if you have a footnote in Markdown, like
anywhere on the page, then you can just use
[erldns]
instead of[erldns][erldns]
🙃