mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-02-17 11:55:32 +02:00
Add request ID to error reports
This commit is contained in:
parent
a31e4e7c79
commit
01b053277d
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Add
|
### Add
|
||||||
- Add processing/info options and source image URL to error reports.
|
- Add request ID, processing/info options, and source image URL to error reports.
|
||||||
|
|
||||||
### Change
|
### Change
|
||||||
- Support configuring OpenTelemetry with standard [general](https://opentelemetry.io/docs/languages/sdk-configuration/general/) and [OTLP Exporter](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/) environment variables.
|
- Support configuring OpenTelemetry with standard [general](https://opentelemetry.io/docs/languages/sdk-configuration/general/) and [OTLP Exporter](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/) environment variables.
|
||||||
|
@ -135,6 +135,8 @@ func withPanicHandler(h router.RouteHandler) router.RouteHandler {
|
|||||||
ctx := errorreport.StartRequest(r)
|
ctx := errorreport.StartRequest(r)
|
||||||
r = r.WithContext(ctx)
|
r = r.WithContext(ctx)
|
||||||
|
|
||||||
|
errorreport.SetMetadata(r, "Request ID", reqID)
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if rerr := recover(); rerr != nil {
|
if rerr := recover(); rerr != nil {
|
||||||
if rerr == http.ErrAbortHandler {
|
if rerr == http.ErrAbortHandler {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user