All Apps and Add-ons

Splunk MINT: Why are unhandled crash reports not always uploaded to Splunk?

sorka95032
New Member

There appears to be a flushing issue causing crash reports to be clipped or not uploading.

We've configured it like this:

    Mint.sharedInstance().enableMintLoggingCache(true)
    Mint.sharedInstance().enableLogging(true)
    Mint.sharedInstance().setLogging(lines)

    Mint.sharedInstance().disableNetworkMonitoring()
    Mint.sharedInstance().initAndStartSessionWithAPIKey(AppConfig.Splunk.apiKey)

If lines are set to something like 300, the crash never makes it up to Splunk. If it's set to 100, about 10% of the crash reports make it up. If set to 8, about 95% of the crash reports make it up. If set to 0, 99+% of the unhandled crashes are uploaded.

Is this a flushing issue? Is there a way to force a flush on an unhandled crash?

0 Karma

mmargulis_splun
Splunk Employee
Splunk Employee

Do you have problem with iOS or Android SDK?,Do you have a problem with Android or iOS SDK or both?

0 Karma

sorka95032
New Member

Android is working fine. This is with iOS only.

0 Karma

croyal_splunk
Splunk Employee
Splunk Employee

Hi -

Mint.sharedInstance().flush()

Please 'sprinkle' the flush intermittently throughout the app; it should alleviate the issue.

0 Karma

croyal_splunk
Splunk Employee
Splunk Employee

What is your platform and SDK version?

0 Karma

sorka95032
New Member

We call flush frequently already. Even when we call it once for every single logging call it makes no difference. Also, if this were the issue wouldn't the log eventually be uploaded when we restart the app?

0 Karma

croyal_splunk
Splunk Employee
Splunk Employee

What version of the SDK are you using? We did fix issues with 5.2.x release regarding events appearing in Splunk.

0 Karma

sorka95032
New Member

Just ran the same test with 5.2. No difference. 0 lines of logging result in 100% crash logs retrieval but 150 lines of logging resulted in no crash logs 10 / 10 times.

Not sure if this link will work, but here's one with sdk 5.2 with setLogging(0) to show that we're really running with 5.2 now:

https://mint.splunk.com/dashboard/project/715c50c8/errors/8353068058

0 Karma

sorka95032
New Member

Sorry for the late response. We are using 5.1. I'm guessing from your comment that we should probably move to 5.2 🙂

0 Karma

sorka95032
New Member

One other thing I tried was adding:

    NSSetUncaughtExceptionHandler { exception in
        Mint.sharedInstance().flush()
    }

In the application callback of AppDelegate as an attempt to "last breath" flush but again that made no difference. Once in a rare while, restarting the app does upload the previous crash but only 1 in say 50 attempts.

If we setLogging(0), then we're 100% successful uploading crashes. In this case, in a rare while the crash log doesn't upload until you restart, but in either case, when setLogging(0) is set, we never lose the crash log.

0 Karma

sorka95032
New Member

Forgot to mention, this is for iOS with 5.1 of the mint SDK.

0 Karma

sorka95032
New Member

Also, when the app is restarted the previous crash log is still not uploaded so it doesn't appear to be saving off what it wasn't able to upload before the OS ripped out the app instance at the knees.

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...