From da7f237f07c87b1124fdfc216eb1c2b664d62166 Mon Sep 17 00:00:00 2001 From: Jacob Quinn Date: Wed, 10 May 2023 15:01:41 -0600 Subject: [PATCH] add docs for logtag --- docs/src/client.md | 4 ++++ src/HTTP.jl | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/src/client.md b/docs/src/client.md index 4190037ab..74efb2ecf 100644 --- a/docs/src/client.md +++ b/docs/src/client.md @@ -107,6 +107,10 @@ When a non-2XX HTTP status code is received in a response, this is meant to conv If `true`, `HTTP.StatusError`, `HTTP.TimeoutError`, `HTTP.IOError`, and `HTTP.ConnectError` will be logged via `@error` as they happen, regardless of whether the request is then retried or not. Useful for debugging or monitoring requests where there's worry of certain errors happening but ignored because of retries. +### `logtag` + +If provided, will be used as the tag for error logging. Useful for debugging or monitoring requests. + ### `observelayers` If `true`, enables the `HTTP.observelayer` to wrap each client-side "layer" to track the amount of time spent in each layer as a request is processed. This can be useful for debugging performance issues. Note that when retries or redirects happen, the time spent in each layer is cumulative, as noted by the `[layer]_count`. The metrics are stored in the `Request.context` dictionary, and can be accessed like `HTTP.get(...).request.context`. diff --git a/src/HTTP.jl b/src/HTTP.jl index 9117f29f8..9e0633ffc 100644 --- a/src/HTTP.jl +++ b/src/HTTP.jl @@ -158,6 +158,7 @@ Supported optional keyword arguments: - `logerrors = false`, if `true`, `HTTP.StatusError`, `HTTP.TimeoutError`, `HTTP.IOError`, and `HTTP.ConnectError` will be logged via `@error` as they happen, regardless of whether the request is then retried or not. Useful for debugging or monitoring requests where there's worry of certain errors happening but ignored because of retries. + - `logtag = nothing`, if provided, will be used as the tag for error logging. Useful for debugging or monitoring requests. - `observelayers = false`, if `true`, enables the `HTTP.observelayer` to wrap each client-side "layer" to track the amount of time spent in each layer as a request is processed. This can be useful for debugging performance issues. Note that when retries or redirects happen, the time spent in each layer is cumulative, as noted by the `[layer]_count`. The metrics are stored