Git Product home page Git Product logo

Comments (4)

russmiles avatar russmiles commented on June 18, 2024

Or handled with a better FailedActivity message, such as is done in the Cloud Foundry extension:

https://github.com/chaostoolkit-incubator/chaostoolkit-cloud-foundry/blob/e6efd499b06dfecb3aec26c7d2dcc2a429ff2298/chaoscf/api.py#L49

from chaostoolkit-instana.

russmiles avatar russmiles commented on June 18, 2024

When this is in it feels like a good enough set of actions to do a minor, 0.1.1 release. Wdyt @Lawouach ?

from chaostoolkit-instana.

Lawouach avatar Lawouach commented on June 18, 2024

Agreed on both accounts.

Let's always try to keep the stdout output as clean as possible and focused on the experiment. Doesn't mean we can never use it but it must be in relation to experiment (a dialogue with the operator). Otherwise use the chaostoolkit.log for more information.

For instance:

logger.info(...)

or

logger.error(...)

will send log to the stdout.

Whereas:

logger.debug(...)

writes to the chaostoolkit.log file.

You can therefore do this:

logger.debug("Boom, this thing failed badly: {}".format(str(error_message))
raise ActivityFailed("Your experiment may fail due to an unexpected behavior from the activity

The firest line will write more info into the logfile, the second line will dialogue nicely with the operators settings their expectations.

When you caught an exception and want to lok it:

try
    ...
except Exception:
   logger.debug("Boom, this thing failed badly", exc_info=True)
   raise ActivityFailed("Your experiment may fail due to an unexpected behavior from the activity

This could be described in docs of the toolkit me think :)

from chaostoolkit-instana.

russmiles avatar russmiles commented on June 18, 2024

Good point, and we were mulling this here. In this case it's likely that FailedActivity and its message will be right, as it is failed and it is indicative of a fundamental error in trying to talk to Instana.

from chaostoolkit-instana.

Related Issues (15)

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.