Netflix-Skunkworks / raven-python-lambda

Sentry/Raven SDK Integration For AWS Lambda (python) and Serverless
Apache License 2.0
47 stars 15 forks source link

How to get client? #36

Closed Lifto closed 6 years ago

Lifto commented 6 years ago

From Readme:

from raven import Client # Offical `raven` module
client.captureMessage("Hello from Lambda!", level="info ")

where does 'client' (with lower case) come from?

my code:

from raven import Client
from raven_python_lambda import RavenLambdaWrapper

@RavenLambdaWrapper()
def handler():
    Client.captureMessage('test message 2018-07-31 python 2')

gives error: TypeError: captureMessage() missing 1 required positional argument: 'message'

Lifto commented 6 years ago

this worked: Client().captureMessage('test message 2018-07-31 python 2')