From ebc278ec98bb24f2852b61fde2a9bf2e3d83818b Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Wed, 30 Dec 2020 13:44:02 -0500 Subject: metrics: allow disabling OpenMetrics negotiation (#3944) * metrics: allow disabling OpenMetrics negotiation Signed-off-by: Dave Henderson * fixup! metrics: allow disabling OpenMetrics negotiation --- .../caddyfile_adapt/metrics_disable_om.txt | 36 ++++++++++++++++++++++ .../integration/caddyfile_adapt/metrics_syntax.txt | 33 ++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 caddytest/integration/caddyfile_adapt/metrics_disable_om.txt create mode 100644 caddytest/integration/caddyfile_adapt/metrics_syntax.txt (limited to 'caddytest/integration') diff --git a/caddytest/integration/caddyfile_adapt/metrics_disable_om.txt b/caddytest/integration/caddyfile_adapt/metrics_disable_om.txt new file mode 100644 index 0000000..2d7b24f --- /dev/null +++ b/caddytest/integration/caddyfile_adapt/metrics_disable_om.txt @@ -0,0 +1,36 @@ +:80 { + metrics /metrics { + disable_openmetrics + } +} +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":80" + ], + "routes": [ + { + "match": [ + { + "path": [ + "/metrics" + ] + } + ], + "handle": [ + { + "disable_openmetrics": true, + "handler": "metrics" + } + ] + } + ] + } + } + } + } +} diff --git a/caddytest/integration/caddyfile_adapt/metrics_syntax.txt b/caddytest/integration/caddyfile_adapt/metrics_syntax.txt new file mode 100644 index 0000000..ca08cea --- /dev/null +++ b/caddytest/integration/caddyfile_adapt/metrics_syntax.txt @@ -0,0 +1,33 @@ +:80 { + metrics /metrics +} +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":80" + ], + "routes": [ + { + "match": [ + { + "path": [ + "/metrics" + ] + } + ], + "handle": [ + { + "handler": "metrics" + } + ] + } + ] + } + } + } + } +} -- cgit v1.2.3