diff --git a/README.md b/README.md index be7747b..4199891 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,13 @@ metrics: image: yavook/kiwi-simple-metrics:0.1 environment: METRICS__LOG__ENABLED: "True" - METRICS__WEBHOOK__URL: "https://my.webhook.host/success?report={}" - METRICS__WEBHOOK__FAIL: "https://my.webhook.host/failure?report={}" + METRICS__WEBHOOK__URL: "https://my.webhook.host/success?report={result}" + METRICS__WEBHOOK__FAIL: "https://my.webhook.host/failure?report={result}" ``` - same metrics as above - logs reports to stdout -- triggers webhooks (`{}` is the placeholder for the result string) +- triggers webhooks (`{result}` is the placeholder for the result string) ## Configuration diff --git a/kiwi_simple_metrics/metrics/_report.py b/kiwi_simple_metrics/metrics/_report.py index 5cf4044..5d8bac4 100644 --- a/kiwi_simple_metrics/metrics/_report.py +++ b/kiwi_simple_metrics/metrics/_report.py @@ -126,7 +126,7 @@ class Report: requests.get( url=str(url).format( - urllib.parse.quote_plus(self.result) + result=urllib.parse.quote_plus(self.result) ), verify=not SETTINGS.webhook.insecure, )