Giter Club home page Giter Club logo

krakend-circuitbreaker's People

Contributors

alombarte avatar deepsourcebot avatar kpacha avatar rgomezcasas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

krakend-circuitbreaker's Issues

Adding a name for the circuit breaker

Hello,

Since sony/gobreaker support naming each circuit breaker, I believe it would be a nice and simple addition to the Config struct, because as it is when a user enables LogStatusChange the log line always reads:
[KRAKEND] 2020/06/24 - 17:40:32.752 โ–ถ WARNIN circuit breaker named '' went from 'closed' to 'open'

Integrate with Opencensus

Hey, I was wondering if it's at all possible to integrate this into the opencensus exporters. Currently there is no automatic way (aside from parsing the log entries) to find out whether a circuit breaker is tipped or not.

Question about circuit breaker behaviour with `no-op` encoding

Hi,

@alombarte

Krakend version = v2.6.3.

The following config produces a log when the breaker's status changes:

{
    "version": 3,
    "port": 8080,
    "echo_endpoint": true,
    "endpoints": [
        {
            "endpoint": "/test/{var}",
            "backend": [
                {
                    "host": [
                        "http://127.0.0.1:8080"
                    ],
                    "url_pattern": "/",
                    "extra_config": {
                        "qos/circuit-breaker": {
                            "interval": 60,
                            "timeout": 10,
                            "max_errors": 3,
                            "name": "krakend-circuitbreaker",
                            "log_status_change": true
                        }
                    }
                }
            ]
        }
    ]
}

However, when no-op encoding is added, no log is produced when the breaker's status changes:

{
    "version": 3,
    "port": 8080,
    "echo_endpoint": true,
    "endpoints": [
        {
            "endpoint": "/test/{var}",
            "output_encoding": "no-op",
            "backend": [
                {
                    "encoding": "no-op",
                    "host": [
                        "http://127.0.0.1:8080"
                    ],
                    "url_pattern": "/",
                    "extra_config": {
                        "qos/circuit-breaker": {
                            "interval": 60,
                            "timeout": 10,
                            "max_errors": 3,
                            "name": "krakend-circuitbreaker",
                            "log_status_change": true
                        }
                    }
                }
            ]
        }
    ]
}

The docs have this:

There is a small difference in behavior when you use the circuit breaker with no-op encoding vs. the rest of the encodings.

Is this behaviour expected?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.