GithubHelp home page GithubHelp logo

Comments (1)

MatthewMiele avatar MatthewMiele commented on May 5, 2024

I've just run into what seems to be the same issue. It looks like the problem is with this line

elif status_code == 500 and not signals.signals_available:

specifically the signals check and not signals.signals_available.
for me signals.signals_available is True.

For signals to work in Flask you need a library called blinker. When I remove blinker, signals.signals_available becomes False and my error spans are restored.

I think the real bug might lie in this file / with how Honeycomb is using signals?

if signals.signals_available:
self.app.teardown_request(self._teardown_request)

specifically in this function
def _teardown_request(self, exception):
if exception:
beeline.add_field('request.error_detail',
beeline.internal.stringify_exception(exception))
beeline.add_field('request.error', str(type(exception)))
beeline.internal.send_event()

It seems like it adds a callback for Flask signals to call at the end of the request but for me the exception that is being based in is None and I believe this is due to already being handled by my custom error handlers in Flask. By the time the code gets here there is no Exception, its now just a normal response object that is a 500 with some json.

Removing all my custom error handlers (and running flask locally not in development mode - to stop flasks built in error handler) the error spans also reappear - this time with blinker installed

from beeline-python.

Related Issues (20)

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.