microsoft / applicationinsights-ios Goto Github PK
View Code? Open in Web Editor NEWMicrosoft Application Insights SDK for iOS
License: Other
Microsoft Application Insights SDK for iOS
License: Other
We should definitely have a master switch for this feature.
Hi,
Title sums it up. What is the time measurement we should be using? Documentation does not specify. The example uses 300, is that 300 seconds? aka NSTimeInterval or 300 milliseconds? The API type is (long).. why not use the standard NSTimeInterval objc type?
Thanks for your time!
Is there any way to force a flush on MSAIChannel queue, before the senderinterval time?
To clarify, we'd have to be able to do it from MSAITelemetryManager
No time between sessions data shows up.
o How do we calculate this? Are we doing the right thing for iOS apps?
o Didn’t see data, even after multiple sessions and waiting for a while
Under “Set up Xcode” step 1, drag drop will bring up option to check “copy items if needed”, which user should do, but is not mentioned in docs
More and more I am seeing developers move to Carthage from Cocoapods due to it being a cleaner way of managing dependencies. Would it be possible to add support to this SDK?
No user id is sent for iOS. This is manifesting itself as lack of user information in the portal (users = 0)
we should remove this check: https://github.com/Microsoft/ApplicationInsights-iOS/blob/a306f26118c39291f097b395c216772d0710e6ef/Classes/MSAIApplicationInsights.m#L246-L249
and change this so that it doesn't cause a trailing slash to be appended to the endpoint of the path is nil: https://github.com/Microsoft/ApplicationInsights-iOS/blob/a306f26118c39291f097b395c216772d0710e6ef/Classes/MSAIAppClient.m#L24
We should look into using something else than the architecture
property.
See https://github.com/Microsoft/AppInsights-iOS/blob/master/Classes/MSAICrashReportTextFormatter.m#L278
Hello! I tried again to use App Insights (beta 7) with HockeyApp (preseason) and I'm getting some duplicate symbol errors when I build the project:
duplicate symbol _defaultFileCount in:
/Users/jessicayeh/Documents/OmniBuzz/iOS and Apple Watch/Vendor/ApplicationInsights/ApplicationInsights.framework/ApplicationInsights(MSAIPersistence.o)
/Users/jessicayeh/Documents/OmniBuzz/iOS and Apple Watch/Vendor/HockeySDK.embeddedframework/HockeySDK.framework/HockeySDK(BITPersistence.o)
duplicate symbol _kPersistenceQueueString in:
/Users/jessicayeh/Documents/OmniBuzz/iOS and Apple Watch/Vendor/ApplicationInsights/ApplicationInsights.framework/ApplicationInsights(MSAIPersistence.o)
/Users/jessicayeh/Documents/OmniBuzz/iOS and Apple Watch/Vendor/HockeySDK.embeddedframework/HockeySDK.framework/HockeySDK(BITPersistence.o)
duplicate symbol _kFileBaseString in:
/Users/jessicayeh/Documents/OmniBuzz/iOS and Apple Watch/Vendor/ApplicationInsights/ApplicationInsights.framework/ApplicationInsights(MSAIPersistence.o)
/Users/jessicayeh/Documents/OmniBuzz/iOS and Apple Watch/Vendor/HockeySDK.embeddedframework/HockeySDK.framework/HockeySDK(BITPersistence.o)
ld: 3 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I also cleaned the project and deleted derived data.
Step 9 should include a link on how to get an instrumentation key, like we do for the Android instructions:
Please see the "Getting an Application Insights Instrumentation Key" section of the wiki for more information on acquiring a key.
For Swift, in Step 5, the IDE recommends removing “message:” from the code snippet. Should just be:
MSAIMetricsManager.trackTraceWithMessage("Test message");
Under “Modify Code”, Step 4 should include info on when to use the shortcut instead of the full lines
Could this be made into a pod?
It would be great if the instructions are clearer on what’s the minimal setup to get some default data (page views/sessions/users) to show up in the portal, and then in addition what else the user can set up (custom telemetry, for example) to get more than that.
o Currently, it’s not clear at which step the data will show up.
Building with the latest Xcode 7.0 beta 6 (7A192o), I get the following error about the framework not being built with bit code.
I am including the framework via Cocoapods and am include 1.0-beta.6 of the App insights iOS framework.
ApplicationInsights/ApplicationInsights/ApplicationInsights.framework/ApplicationInsights(MSAIApplicationInsights.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I tried compiling an app with the app insights SDK it said I need to disable bitcode, but bitcode is required to be on (for all targets, even the main app, I read) for a project that has a watch app :(
For Swift, in Step 2, the import code in the instructions has a “#” at the front, but we tried without # and it works too. Not sure if “#” is necessary.
I think we currently always append /v2/track
even to server URLs set during configuration
If you want to get alerted by Application Insights when an error occurs in an iOS app, you have to use the trackException method. This shows up in the portal as a "crash", but it manifests as the "Server exceptions" metric in the alert rules. The trackException method does not allow you to include a properties dictionary, so then you have to send an additional trackTraceWithMessage:properties: or trackEventWithName:properties: call to send additional property information (the TrackException method in the .NET API does allow you to send additional properties and metrics). This seems very unpolished, especially since the use of exceptions in iOS isn't standard.
There is an enum MSAISeverityLevel which defines severities but there are no samples showing its usage and a search through sources didn't bring more clarity. Is it in use? Can you show how it should be used with, for instance, trackTraceWithMessage?
I should be able to choose specific severity while sending messages to App Insights server. And I would expect to see messages created with severity Error or Critical in the Portal's section named Failures.
Are these valid asks?
When I archive my project to submit to the app store, I get a crazy amount of warnings (200+) from App Insights 😯 It's only when I archive, when I just build it, the warnings don't show up.
Here's a similar problem on the Apple Developer forums: https://forums.developer.apple.com/thread/17921
This seems to be an odd problem. The 1.0-beta.3 release zip still has the MSAICrashMetaData.h file included within it, but that file is not imported in the ApplicationInsights.h umbrella header, so the module fails to compile in Xcode. If I add `#import "MSAICrashMetaData.h" to the umbrella header, everything seems to compile correctly.
However, when I look at the git repo, this file has been removed from the latest release. Is this a bad release binary?
I have this code:
@try {
@throw [[NSException alloc] initWithName:@"test" reason:@"reason"];
} @catch (NSException *exception) {
[MSAITelemetryManager trackException:exception];
}
This is tracked as a crash in the portal, but it's a handled exception.
Taking a look at the source code shows all exceptions go through the crash reporting process, regardless of handled or not. - https://github.com/Microsoft/ApplicationInsights-iOS/blob/master/Classes/MSAITelemetryManager.m#L239-L254
Until this is handled I guess the workaround would be to use traceMessage with custom properties?
Can we indicate in device model property that the data is being sent from an emulator if that is the case?
Steps 2 and 3 are a little confusing
o What does “our projects” refer to?
o Are the steps necessary?
It's set/generate twice, I think this is how it's supposed to be:
But then it will be overwritten or even set to "???" here:
I guess the last block is legacy and can be removed.
Swift: remove the “Endpoints” section as it’s not needed.
In the Download & Extract section, wording for Step 3 is a little awkward with use of “we”.
o Instead of “we usually put 3rd-party code… , so we move the directory…”, how about “You can move the folder to anywhere in your project director and it will work. But to keep code organized, you can also create a Vendor subdirectory and put the folder there”.
On this wiki page:
https://github.com/Microsoft/ApplicationInsights-iOS/wiki/How-to-Generate-a-Test-Crash
The code snippet for triggering a crash is out of date. Instead of:
[[[MSAIApplicationInsights sharedInstance] crashManager] generateTestCrash];
It should be*
[[MSAICrashManager sharedManager] generateTestCrash];
* I haven't actually tested this in objc. I'm writing mine in Swift and this worked for me:
MSAICrashManager.sharedManager().generateTestCrash()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.