Skip to content

Commit

Permalink
add docs for logtag
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed May 10, 2023
1 parent d799ddb commit da7f237
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/src/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
1 change: 1 addition & 0 deletions src/HTTP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da7f237

Please sign in to comment.