Skip to content

Commit

Permalink
[metric-relay] Fix empty response body when metric list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
fpapon committed Dec 18, 2023
1 parent a1a74a5 commit 16f6610
Show file tree
Hide file tree
Showing 4 changed files with 814 additions and 4 deletions.
10 changes: 7 additions & 3 deletions documentation/src/main/minisite/content/metrics-relay.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The metrics relay provide an endpoint with 2 methods:

[source,bash]
----
curl -X POST http://localhost:8080/relay?id=test -H 'Content-Type: text/plain' -d '
curl -X POST http://localhost:8080/relay?dropOnPull=true -H 'Content-Type: text/plain' -d '
# TYPE foo1 gauge
# HELP foo1 doc
foo1 1234
Expand All @@ -46,13 +46,17 @@ foo1 1234
foo2 1235'
----

* GET: `/relay?id=test` to fetch the latest metrics.
* GET: `/relay?id=test` to fetch the latest metrics of the matching id `test`:

[source,bash]
----
curl http://localhost:8080/relay
curl http://localhost:8080/relay?id=test
----

[TIP]

If you want to collect all the ids, you can remove the `id` query parameter.

You can set the query param `ignoreDrop` to `true` (default is `false`) to disable the drop policy define on the entry:

[source,bash]
Expand Down
Loading

0 comments on commit 16f6610

Please sign in to comment.