-
-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SentryFlutter Performance Monitoring not working #720
Comments
It should be enough to just set the tracesSampleRate to 1. Maybe setting both is not supported, as they're two different ways to archive the same goal. |
I've tried setting them both separately and at the same time with no positive results. The are set in my example because the error message says "No tracesSampleRate and tracesSampler set", so that was my last effort before i came here. |
Do you have a DSN set in your actual code? I ran across some odd messages when I configured sampling but no DSN. |
Yes of course, I'm getting error reports, but unable to enable tracing. |
Hmm, the sampling is currently just on the Dart side I believe. I don't think it is being set into the native SDK, maybe the log is from there as well. We probably need a new integration for that. |
If I put a break point at |
Thats how I found the log item, i checked the Native SDK, and found that the value isnt getting set and throwing that error. |
Well I've traced down that the sample rate is getting set inside of flutter (tracesSampleRate), but there are no transactions coming through, even though I've added both manual and automatic instruments. Still seems like within Objective-C code, the value doesnt get set which results in tracing now getting enabled. |
That is what I said earlier, there is no support currently to set the sampling from Dart -> Native. |
So then the Flutter SDK doesnt actually support Performance tracking? I'm not saying that getting it into Native is important, i'm just trying to debug why it isnt working from Dart/Flutter. Does it not work at all from Flutter? It's documented to work in Flutter, so there is some confusion. |
It works fine for transactions in Dart, I am using it for database access/HTTP requests - but it does not enable native (Java/Swift) transactions to be tracked. |
Do you want add performance tracing only in Dart/Flutter or also on the native side? |
Sentry Dart/Flutter performance only works on the Sentry/Flutter side via Dart code. Users will be able to do it manually once #265 is done. |
I'm just following the SDK setup guide for Flutter. I put in my configuration as seen above, added the HTTP client for automatic collection, added some manual transactions and it doesn't work. Nothing ever appears on the admin side and I see the warning in the debug console about :
But yet I have it configured to do so, which is why there is an issue:
Using
I've just been trying to be helpful to try to track the failure down into the native SDK ( but apparently thats not how events are tracked ), so there is some confusion on how to get this to work out of the box. |
The final transaction = Sentry.getSpan() ??
Sentry.startTransaction(
'web-request',
'request',
bindToScope: true,
);
try {
final response = await sentryHttpClient.get('url'); // probably not the correct code, but you get the idea
transaction.spanStatus = SpanStatus.ok();
} catch (exception, stackTrace) {
transaction.throwable = exception;
transaction.spanStatus = SpanStatus.internalError();
Sentry.captureException(exception, stacktrace);
} finally {
await transaction.finish();
} |
Yup, I also have added |
Automatic instrumentation is only on https://github.com/getsentry/sentry-dart/releases 6.3.0 beta versions. |
Discussed in #719
Originally posted by thertzelle January 26, 2022
Here is my configuration in main: (I removed my DSN)
But when I run my app, I get the following message:
I tried to look everywhere to see if I needed something else enabled, but the documentation doesnt say anything additional...
If I run the project in XCode and add some debugging lines inside of the
- (void)setTracesSampleRate:(NSNumber *)tracesSampleRate
function, tracesSampleRate is being set as null. So either I'm setting it wrong, or something is overring it.Using
sentry_flutter: ^6.2.2
in my pubspec, I'll keep tracing it down to see if I can find whats happening, but seems like a bug?The text was updated successfully, but these errors were encountered: