Skip to content

Invalid bad_request and exception_thrown events in case of client-error #13

Open
@u6f6o

Description

@u6f6o

We use prometheus together with prometheus-hystrix in order to gather data for our Grafana dashboards and to trigger alarms in case something weird happens. Lately we also added some alarm triggers for our clojure projects that use clj-http-hystrix underneath.

As we use standard REST calls, HTTP status codes like 404 appear quite regularly. We noticed though that our clojure services (in opposite to the java services) trigger certain hystrix events ("bad_request" and "exception_thrown") that caused our Grafana dashboards to look quite bad:

image

I figured out that these Hystrix events are triggered due to HystrixBadRequestExceptions that are thrown here in case http/client-error? returns false. I believe this is a wrong behaviour though, as the javdoc states:

NOTE: This should only be used when an error is due to user input such as IllegalArgumentException otherwise it defeats the purpose of fault-tolerance and fallback behavior.

Also there is a test in the hystrix' core library that indicates that this exception should be used for different purposes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions