Giter Site home page Giter Site logo

Comments (17)

alonre avatar alonre commented on July 26, 2024

FYI: I tried to bypass the exception it didn't seem to work:

    def install(self):
        if not hasattr(lambda_bootstrap, 'make_final_handler'):
            setattr(lambda_bootstrap, 'make_final_handler', None)
        old_make_final_handler = lambda_bootstrap.make_final_handler

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

also please tell me the output of the following on AWS (without sentry-sdk installed):

import sys
import __main__
print(__main__.__file__)
print(list(
  (n, m.__file__) for n, m in sys.modules.items()
))

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

Oh! @alonre, I'm sorry, it wasn't clear that you were getting this exception while deploying! I'll push out a fix soon, hang tight.

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

I just release 0.3.11. If that doesn't fix the issue please give me the output of the prints above.

from sentry-python.

hoou avatar hoou commented on July 26, 2024

Will this work on localhost when testing? I mean, I want to run my functions, but not in AWS lambda.

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

It will just disable the integration if it's not in AWS Lambda. What are you testing your application with?

from sentry-python.

alonre avatar alonre commented on July 26, 2024

Thanks @untitaker, chalice deploy now works with 0.3.11.
However, I'm not sure I'm getting exceptions sent to Sentry.

I've disabled the integration and got the printouts you requested (attached).
Thanks for looking into this!
sentry_sdk_debug_print.txt

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

Could you enable debug=True in your call to init and get me the output? I wonder if the integration thinks it's not on AWS

from sentry-python.

alonre avatar alonre commented on July 26, 2024

This is what I got (tested couple of times).
Does this make sense?

[sentry] DEBUG: Shutting down HTTP transport orderly
[sentry] DEBUG: background worker got shutdown request
[sentry] DEBUG: background worker shut down
[sentry] DEBUG: Killing HTTP transport
[sentry] DEBUG: background worker got kill request
[sentry] DEBUG: Shutting down HTTP transport orderly
[sentry] DEBUG: background worker got shutdown request
[sentry] DEBUG: background worker shut down
[sentry] DEBUG: Killing HTTP transport
[sentry] DEBUG: background worker got kill request

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

from sentry-python.

alonre avatar alonre commented on July 26, 2024

Running in AWS:

[DEBUG]	2018-10-09T21:00:04.298Z	__main__ hasattr('make_final_handler'): True

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

Hmm, that sucks. So to summarize, you have a Lambda function that works normally but doesn't send events? Could you share the code?

from sentry-python.

alonre avatar alonre commented on July 26, 2024
  1. Yes - the Lambda is working great
  2. No - can't share code* (proprietary)
    (* I'll try creating a simple "chalice" App and verify I can reproduce the same behavior - and will share that code)

However, I wrote a tiny wrapper to workaround this and managed to get events:

def capture_exceptions(function):
    @functools.wraps(function)
    def wrapper(*args, **kwargs):
        try:
            return function(*args, **kwargs)
        except Exception as ex:
            sentry_sdk.capture_exception(ex)
            raise ex
    return wrapper

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

from sentry-python.

alonre avatar alonre commented on July 26, 2024

Ok cool.
I opened #117.
I might be able to help with the integration.
Leaving it up to you whether to close this one...

from sentry-python.

untitaker avatar untitaker commented on July 26, 2024

Closing as remaining AWS Lambda issues should be about missing framework support

from sentry-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.