dd-trace-go
dd-trace-go copied to clipboard
contrib/labstack/{echo, echo.v4}: improve error detection
This adds improved error detection to the echo integrations. Previously, any returned error was recorded as an error in the echo span. This patch causes the integration to inspect the returned error to determine if it is a echo.HTTPError which it can use to discriminate between real errors (5xx and up by default) or non-errors (below 5xx by default)
This also adds a WithStatusCheck Option which allows users to configure which errors/statuses are reported as errors.
Fixes #987
Manually tested, but need to add unit tests for this.
Done, ready.
Moving to 1.35.0. Hope that's ok. Otherwise ping me.
LGTM 👍
I'm looking forward to merging.
Is there anything I can do ?
Benchmarks
Comparing candidate commit 649a37b8dc775bda4a56efc8c079900e8d947376 in PR branch knusbaum/fix-echo with baseline commit 2f1555e66a44c8ad8ae2a0877ee6fb3109051e92 in branch main.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 6 cases.