Exceptions from AWS Lambda not making it to Sentry project
See original GitHub issuePackage
Sentry.AspNetCore
.NET Flavor
.NET Core
.NET Version
6.0.6
OS
Other
SDK Version
Assembly Sentry, Version=3.20.1.0
Self-Hosted Sentry Version
No response
Steps to Reproduce
- Initialization
protected override void Init(IWebHostBuilder builder)
{
builder.UseSentry(o =>
{
o.Dsn = sentryDsn;
o.Debug = true;
o.FlushOnCompletedRequest = true;
o.FlushTimeout = TimeSpan.FromSeconds(sentryFlushTimeout);
o.TracesSampleRate = 1.0;
o.ConfigureScope(scope =>
{
scope.SetTag("lambda", _sentryTag);
});
});
builder.UseStartup<Startup>();
}
- Capture Event
protected Guid? CaptureEvent(Exception? ex)
{
return Sentry.SentrySdk.CaptureEvent(new Sentry.SentryEvent(ex));
}
- Cloudwatch log shows these entries in the event of an exception:
2022-07-28T14:38:46.720Z 5619f8f9-... [Information] Sentry.ISentryClient: Capturing event.
2022-07-28T14:38:47.400Z 5619f8f9-... [Information] Sentry.ISentryClient: Envelope queued up: 'd498d...'
Expected Result
Expect to see the exceptions captured in the Sentry project, not seeing them.
Am seeing some events captured from previous days so I know Sentry is at least intermittently functional.
Currently adding tagging, should see the exception being tagged.
Actual Result
Have exceptions in the project from 2 days ago but not today when I triggered the error.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Troubleshooting for AWS Lambda
If Sentry cannot locate symbols, then it cannot perform symbolication of stack traces. This means that for some types of projects (depending on...
Read more >Sentry on AWS lambda in nodejs doesn't send exception
I'm trying to configure sentry on AWS Lambda (nodejs 8.10) but the exceptions are not sent to Sentry. I'm the feeling that is...
Read more >Lambda Error Logging With Sentry - Oliver Roick
Every unhandled exception is a bug in your software. Things will go wrong in your Lambda function, and you want to know about...
Read more >️ Serverless Sentry Plugin
This Serverless plugin simplifies integration of Sentry with the popular Serverless Framework and AWS Lambda. Currently we support Lambda Runtimes for ...
Read more >serverless-sentry-lib | npm Security Analysis
The plugin captures these unhandled exceptions, forwards them to Sentry and then exits the Lambda with an error code. Local Development. By default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mattjohnsonpint - more info that might be helpful - Seems that the Sentry client is arbitrarily exiting before the lambda does:
When the exceptions are successfully making it over then you see something like this:
In either case, the entry is preceded by these two log entries consistently:
[Information] Sentry.ISentryClient: Capturing event.
[Information] Sentry.ISentryClient: Envelope queued up: 'd5a90b...'
I’ll take another look. Thanks for reporting.