Sentry is cross-platform application monitoring, with a focus on error reporting.
Official Sentry SDKs for JavaScript. We're hiring https://grnh.se/ca81c1701us
https://github.com/getsentry/self-hosted/runs/7158445726?check_suite_focus=true#step:4:3806
Did you initialize the SDK? : Yes
Did the event get sent? : How do I check it? I logged the eventId that I got after sending the event. The id was: 00000000000000000000000000000000. Also, discard what I said about bugs and issues, those are reported fine. I just had to wait a while. It's just user feedback with attachments that's causing the problem. I think this issue is also similar: https://github.com/getsentry/sentry-dart/issues/903
Can you share the code snippet of the SDK init, how you capture the event, and the userfeedback? : await SentryFlutter.init( (options) { options.dsn = 'https://5815c9a7eabd4f679c96f48eadbb1ef9@o1134900.ingest.sentry.io/6542920'; // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring. // We recommend adjusting this value in production. options.tracesSampleRate = 1.0; }, appRunner: () => runApp( App(), ), );
@lobsterkatie
Please mark the type framework used:
Please mark the type of the runtime used:
Please mark the NuGet packages used:
Create am AWS Lambda ASP.NET Core Web API Project (https://github.com/aws/aws-lambda-dotnet - Lambda ASP.NET Core Web API - serverless.AspNetCoreWebAPI).
This will provide you with two files, LocalEntryPoint
(when the project runs locally), and LambdaEntryPoint
(when deployed as lambda).
Everything works fine when running the Web API locally (LocalEntryPoint) but throws the below exception when running in lambda environment.
System.InvalidOperationException: Unable to resolve service for type 'System.Func
1[Sentry.IHub]' while attempting to activate 'Sentry.AspNetCore.SentryTracingMiddleware'.`
With a little research I found out it's the addition I did in Startup.cs
Configure
method with app.UseSentryTracing();
per documentation (https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/).
SentryTracingMiddleware
will request IHub
with a Func<IHub>
ctor argument which seems like a factory and not sure where to dig into finding more about it (I guess you guys add this dependency in some IServiceCollection
extension.
Running the project locally I can confirm that IHub
is registered in IServiceCollection
.
How I enable Sentry.
public static class WebHostBuilderExtensions
{
public static IWebHostBuilder UseSentryIfNotEightDevelopment(
this IWebHostBuilder webHostBuilder,
Action<SentryAspNetCoreOptions> sentryOptionsAction = null)
{
var isEnabled = SentrySdk.IsEnabled;
if (!isEnabled)
{
var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
var isDevelopment = environment is
EightEnvironment.Dev or
EightEnvironment.Test or
EightEnvironment.QA;
if (!isDevelopment)
{
webHostBuilder.UseSentry(options => ConfigureSentryOptions(options, sentryOptionsAction));
}
}
return webHostBuilder;
}
private static void ConfigureSentryOptions(SentryAspNetCoreOptions options, Action<SentryAspNetCoreOptions> sentryOptionsAction = null)
{
var isEnabled = SentrySdk.IsEnabled;
if (!isEnabled)
{
if (sentryOptionsAction.IsNotNull())
{
sentryOptionsAction(options);
}
}
}
}
And using the extension in LambdaEntryPoint.
public class LambdaEntryPoint :
// When using an ELB's Application Load Balancer as the event source change
// the base class to Amazon.Lambda.AspNetCoreServer.ApplicationLoadBalancerFunction
Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
{
/// <summary>
/// The builder has configuration, logging and Amazon API Gateway already configured. The startup class
/// needs to be configured in this method using the UseStartup<>() method.
/// </summary>
/// <param name="builder"></param>
protected override void Init(IWebHostBuilder builder)
{
builder
.UseDefaultServiceProvider(options => options.ValidateScopes = false)
.UseSentryIfNotEightDevelopment(ConfigureSentryOptions)
.UseStartup<Startup>();
}
private static void ConfigureSentryOptions(SentryAspNetCoreOptions options)
{
options.Release = typeof(LambdaEntryPoint).GetTypeInfo().Assembly.GetName().Version?.ToString();
}
}
@nfelger what a hero! That does work! Thank you!
There's a typo in the example for root.tsx
.
For anyone looking for a workaround, adding this to the exports in remix.config.js
fixed it for me:
serverDependenciesToBundle: [/@sentry\/.*/],
@vaind i fixed the OS issue in Verify. but now the tests fail with no obvious failure message. Any ideas?
that's not caused by this change - already happens on the main MAUI test PR (and no, I have no idea why).
What do you think about updating this on the main branch instead, I'll pull it into the maui test afterwards
@vaind i fixed the OS issue in Verify. but now the tests fail with no obvious failure message. Any ideas?
deploy: 88579265c87b40caefe3f79b1f7c2d6f472b6adc
Please add an entry to CHANGELOG.md
to the "Unreleased" section. Make sure the entry includes this PR's number.
Example:
- Verify on device ([#1764](https://github.com/getsentry/sentry-dotnet/pull/1764))
If none of the above apply, you can opt out of this check by adding #skip-changelog
to the PR description.
@sl0thentr0py From the SDK doc I can see that there are also standard measurements like:
"fp",
"fcp",
"lcp",
"fid",
"cls",
"ttfb",
"ttfb.requesttime",
Which I think we haven't supported yet? Should we also do that?
Adding net-http
as dependency helps to remove some warnings. Adding uri
don't helps. Also upgrading Ruby to 2.7.6 don't removes the warnings. What helps is to move to Ruby 3.x.
I don't mind adding net-http
as dependency but it triggered a lot more warning because of uri
/Users/st0012/.rbenv/versions/2.7.5/lib/ruby/2.7.0/uri/version.rb:3: warning: already initialized constant URI::VERSION_CODE
/Users/st0012/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/uri-0.11.0/lib/uri/version.rb:3: warning: previous definition of VERSION_CODE was here
/Users/st0012/.rbenv/versions/2.7.5/lib/ruby/2.7.0/uri/version.rb:4: warning: already initialized constant URI::VERSION
# dozens more
And this time I can't solve it by adding uri
to Gemfile. Have you seen anything like this?
I'm also still having this issue on 22.6.0 and can also confirm it contains the change from #2809. I'm not using Sentry.Log4Net so I don't think the issue is there. I'm not a Python developer but I assume either settings.DEFAULT_RETENTION_DAYS
or settings.LOWER_RETENTION_DAYS
is a string and not an int.
Platform:
IDE:
split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):
Platform installed with:
Output of the command flutter doctor -v
below:
[√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.22000.739], locale en-US) • Flutter version 3.0.3 at C:\Users\user\source\repos\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 676cefaaff (10 days ago), 2022-06-22 11:34:49 -0700 • Engine revision ffe7b86a1e • Dart version 2.17.5 • DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at C:\Users\user\AppData\Local\Android\sdk • Platform android-33, build-tools 33.0.0 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) • All Android licenses accepted.
[√] Android Studio (version 2021.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[√] VS Code (version 1.68.1) • VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.42.0
[√] Connected device (1 available) • G80 (mobile) • 1080308020406374 • android-arm64 • Android 9 (API 28)
[√] HTTP Host Availability • All required HTTP hosts are available
• No issues found!
The version of the SDK (See pubspec.lock): sdk: ">=2.16.2 <3.0.0"
I have the following issue:
After upgrading the package to 6.6.0 I have no problems with the application, everything works fine, but I see events in the sentry "Issues" tab. I see the following error generated:
java.lang.NoClassDefFoundError: io.sentry.flutter.SentryFlutterPlugin$$ExternalSyntheticLambda4
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5421)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Steps to reproduce:
I am not sure, opening the app? I do not see this in debug mode. From what I've seen this happens on Android only. Here is from the issue itself:
Actual result:
Expected result: