raven-python-lambda
raven-python-lambda copied to clipboard
Adding extra context?
I'm trying to add some extra context to my client, but nothing is ever populating (yes, there are values that match the keys in event
). The doc's say that Client is a singleton so I assumed what I have below would work...but it's not. Am I missing something obvious here?
from raven import Client
from raven_python_lambda import RavenLambdaWrapper
@RavenLambdaWrapper()
def handler(event, context):
client = Client()
client.extra_context({'src_key': event.get('src_key'),
'mapping': event.get('mapping'),
'prefix': event.get('s3prefix'),
'message_id': event.get('message_id')
})
...
Bit of a long shot, but did you ever resolve/workaround this @stickystyle ?
Edit: After looking into it I'm going to migrate to using latest version of sentry-sdk and utilise https://docs.sentry.io/platforms/python/aws_lambda/ after a bit of initial config.
@JoeAlamo Yes, for me after upgrading to sentry-sdk
I've been able to add the extra context to my client.