Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit cb5b277

Browse files
author
Christoph Wendt
committed
Merge tag 'v1.0-alpha.3' into develop
v1.0-alpha.3
2 parents d02aa35 + b630a52 commit cb5b277

File tree

5 files changed

+69
-60
lines changed

5 files changed

+69
-60
lines changed
Binary file not shown.
File renamed without changes.
Binary file not shown.

NOTES.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
# Release Notes
1+
# Release Notes
2+
3+
## 1.0-alpha.3
4+
* Update underlying SDKs
5+
* Application Insights SDK for iOS 1.0-beta.7
6+
* Application Insights SDK for Android 1.0-beta.9
7+
* Remove crash/exception reporting APIs
8+
* Add APIs for setting common properties
9+
* Remove API to set the `userID` field, add API to set the `authUserID` (fixes user statistics)
10+
* Minor bugfixes
211

312
## 1.0-alpha.2
413
* Add NuGet support
514
* Prevent linker from stripping SDK assemblies (release builds on iOS)
615
* Align public interface (remove additional parameters of setup()-method on Android)
716
* Add license and release notes
8-
17+
918
## 1.0-alpha.1
1019
* Android and iOS support
1120
* **Auto collection** (sessions and page views)

README.md

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
# Application Insights for Xamarin (1.0-alpha.2)
1+
# Application Insights for Xamarin.Forms (1.0-alpha.3)
22

33
<span style="color:green">If you want to use the a version of the SDK, which doesn't have a dependency on Xamarin.Forms, please switch to</span> [**feature/remove-xamarin-forms**](https://github.com/Microsoft/ApplicationInsights-Xamarin/tree/feature/remove-xamarin-forms) *(Thanks to [xvare](https://github.com/xvare))*. However, changes on this branch have not been fully tested, yet.
44

55
This project provides an Xamarin SDK for Application Insights. [Application Insights](http://azure.microsoft.com/en-us/services/application-insights/) is a service that allows developers to keep their applications available, performing, and succeeding. This SDK allows your Xamarin apps to send telemetry of various kinds (events, traces, exceptions, etc.) to the Application Insights service where your data can be visualized in the Azure Portal. Currently, we provide support for iOS and Android.
66

7+
##Breaking Changes!
8+
9+
Version 1.0-alpha.3 of the Application Insights SDK for Xamarin.Forms comes with two major changes:
10+
11+
Crash Reporting and the API to send handled exceptions have been removed from the SDK. In addition, the Application Insights SDK for Xamarin.Forms is now deprecated.
12+
13+
The reason for this is that [HockeyApp](http://hockeyapp.net/releases) is now our major offering for mobile and cross-plattform crash reporting, beta distribution and user feedback. We are focusing all our efforts on enhancing the HockeySDK and adding telemetry features to make HockeyApp the best platform to build awesome apps. We've launched [HockeyApp Preseason](http://hockeyapp.net/blog/2016/02/02/introducing-preseason.html) so you can try all the new bits yourself, including User Metrics.
14+
15+
We apologize for any inconvenience and please feel free to [contact us](http://support.hockeyapp.net/) at any time.
16+
717
## Content
818
1. [Requirements](#1)
919
2. [Release Notes](#2)
@@ -12,46 +22,47 @@ This project provides an Xamarin SDK for Application Insights. [Application Insi
1222
5. [Developer Mode](#5)
1323
6. [Basic Usage](#6)
1424
7. [Automatic Collection of Lifecycle Events](#7)
15-
8. [Exception Handling (Crashes)](#8)
16-
9. [Additional configuration](#9)
17-
10. [Integrate plugin sources](#10)
18-
11. [Troubleshooting](#11)
19-
12. [Contact](#12)
25+
8. [Additional configuration](#8)
26+
9. [Integrate plugin sources](#9)
27+
10. [Troubleshooting](#10)
28+
11. [Contact](#11)
2029

2130

2231
## <a name="1"></a> 1. Requirements
23-
The minimum API level to use the Application Insights Xamarin SDK in your **Android** app is 9. However, automatic collection of lifecycle-events requires API level 15 and up (Ice Cream Sandwich+). For **iOS** builds the minimum iOS version is 6.
32+
The minimum API level to use the Application Insights SDK for Xamarin.Forms in your **Android** app is 9. However, automatic collection of lifecycle-events requires API level 15 and up (Ice Cream Sandwich+). For **iOS** builds the minimum iOS version is 6. Furthermore, the SDK has a dependency on 2.0.1.6505.
2433

2534
The SDK has been developed and tested with the following framework versions:
2635

27-
* Mono Framework MDK 4.0.2.5
28-
* Xamarin.Android 5.1.4.16
29-
* Xamarin.iOS 8.10.3.2
36+
* Xamarin.Android 6.0.1.10
37+
* Xamarin.iOS 9.4.1.25
3038

3139
Older versions might work, but haven't been tested.
3240

3341
## <a name="2"></a> 2. Release Notes
3442

3543
Also see changes in [older versions](NOTES.md).
3644

37-
* Add NuGet support
38-
* Prevent linker from stripping SDK assemblies (release builds on iOS)
39-
* Align public interface (remove additional parameters of setup()-method on Android)
40-
* Add license and release notes
45+
* Update underlying SDKs
46+
* Application Insights SDK for iOS 1.0-beta.7
47+
* Application Insights SDK for Android 1.0-beta.9
48+
* Remove crash/exception reporting APIs
49+
* Add APIs for setting common properties
50+
* Remove API to set the `userID` field, add API to set the `authUserID` (fixes user statistics)
51+
* Minor bugfixes
4152

4253

4354
##<a name="3"></a> 3. Breaking Changes & deprecations
4455

45-
* `Using` statement changed: `using AI.XamarinSDK.Abstractions;`
46-
* `setup()`-method for Android changed: As on iOS this method only takes the instrumentation key as parameter
56+
* Remove crash reporting and APIs for exception tracking
57+
* `ApplicationInsights.SetUserId(string)` changed to `ApplicationInsights.SetAuthUserId(string)`
4758

4859
##<a name="4"></a> 4. Setup
4960

5061
We're assuming you are using Xamarin Studio to create your apps.
5162

5263
### 4.1 **Add SDK to your Xamarin solution**
5364

54-
Clone the repository in order to get the SDK sources. It contains 2 subfolder, one for a demo project (*DemoApp*) and one for the SDK (*ApplicationInsightsXamarin*).
65+
Clone the repository in order to get the SDK sources. It contains 3 subfolder, one for a demo project (*DemoApp*), one for a local NuGet package (*NuGet*), and another one for the SDK sources (*ApplicationInsightsXamarin*).
5566

5667
There are several ways to integrate the Application Insights Xamarin SDK into your app. The recommend way is to use the NuGet-package. However, you can also integrate the SDK by importing the sources.
5768

@@ -60,7 +71,7 @@ There are several ways to integrate the Application Insights Xamarin SDK into yo
6071
3. [Configure a local package source](http://developer.xamarin.com/guides/cross-platform/application_fundamentals/nuget_walkthrough/) and let it point to
6172
*ApplicationInsightsXamarin/NuGet*
6273
4. Choose the local package source in the sources dropdown
63-
4. Check the **Show pre-release packages** and select **ApplicationInsights SDK for Xamarin-Forms**
74+
4. Check the **Show pre-release packages** and select **ApplicationInsights SDK for Xamarin.Forms**
6475
5. Click the **Add Package** button
6576
6. Repeat those steps for all other platform projects
6677

@@ -96,7 +107,7 @@ Please see the "[Getting an Application Insights Instrumentation Key](https://gi
96107
AI.XamarinSDK.iOS.ApplicationInsights.Init();
97108
```
98109
99-
4. Replace `<YOUR_IKEY_HERE>`with the instrumentation key of your app.
110+
4. Replace `<YOUR_IKEY_HERE>` with the instrumentation key of your app.
100111

101112
**Congratulation, now you're all set to use Application Insights! See [Usage](#6) on how to use Application Insights.**
102113

@@ -112,7 +123,7 @@ ApplicationInsights.SetDebugLogEnabled(false);
112123

113124
## <a name="6"></a> 6. Basic Usage ##
114125

115-
The ```TelemetryManager``` provides various class methods to track events, traces, metrics page views, and handled exceptions. The class should only be used after *ApplicationInsights* has been [set up & started](#4).
126+
The ```TelemetryManager``` provides various class methods to track events, traces, metrics, and page views. The class should only be used after *ApplicationInsights* has been [set up & started](#4).
116127

117128
```csharp
118129
//track an event
@@ -125,14 +136,7 @@ TelemetryManager.TrackPageView ("My custom page view");
125136
TelemetryManager.TrackTrace ("My custom message");
126137

127138
//track a metric
128-
TelemetryManager.TrackMetric ("My custom metric", 2.2);
129-
130-
//track handled exceptions
131-
try {
132-
int value = 1 / int.Parse("0");
133-
}catch (Exception e){
134-
TelemetryManager.TrackManagedException (e, true);
135-
}
139+
TelemetryManager.TrackMetric ("My custom metric", 2.2);
136140
```
137141

138142
Some data types allow for custom properties.
@@ -168,29 +172,11 @@ ApplicationInsights.SetAutoSessionManagementDisabled(true);
168172
//before ApplicationInsights.Start()
169173
```
170174

171-
## <a name="8"></a>8. Exception Handling (Crashes)
172-
173-
The Application Insights Xamarin SDK enables crash reporting **per default**. Unhandled exceptions from managed (C# code) & unmanaged code (Java / native library) will be sent to the server as soon as possible: On Android this mighthappen even before the app crashes. For iOS builds unhandled exceptions will be reported right after the next app start.
174-
175-
This feature can be disabled as follows:
176-
177-
```java
178-
//after ApplicationInsights.Setup(...);
179-
ApplicationInsights.SetCrashManagerDisabled(true);
180-
//before ApplicationInsights.Start()
181-
```
182-
183-
To get more meaningful crash reports (File name and line numbers) you can change the **Debug Informations** level of your plattform specific app projects.
184-
185-
1. Right click on your Android or iOS app project in the Solution panel
186-
2. Go to *Options* - *Compiler*
187-
3. Set *Debug Informations* to `Full`. Make sure you have selected the right target (Debug/Release) before you check the results.
188-
189-
## <a name="9"></a>9. Additional Configuration
175+
## <a name="8"></a>8. Additional Configuration
190176

191177
To configure Application Insights according to your needs, there are some other options listed here
192178

193-
### 9.1 Set User Session Time
179+
### 8.1 Set User Session Time
194180

195181
The default time the users entering the app counts as a new session is 20s. If you want to set it to a different value, do the following:
196182

@@ -199,25 +185,38 @@ The default time the users entering the app counts as a new session is 20s. If y
199185
ApplicationInsights.SetSessionExpirationTime(30000)
200186
```
201187

202-
### 9.2 Set Different Endpoint
188+
### 8.2 Set Different Endpoint
203189

204190
You can also configure a different server endpoint for the SDK if needed:
205191

206192
```csharp
207193
ApplicationInsights.SetServerUrl("https://myServer.com/track");
208194
```
209195

210-
### 9.3 Override sessionID and userID
196+
### 8.3 Override sessionID and ID of authenticated users
211197

212198
Application Insights manages IDs for a session and for individual users for you. If you want to override the generated IDs with your own, it can be done like this:
213199

214-
```java
215-
ApplicationInsights.SetUserId("User371263");
200+
```csharp
201+
ApplicationInsights.SetAuthUserId("User371263");
216202
ApplicationInsights.RenewSession("New session ID");
217203
```
218-
[**NOTE**] If you want to manage sessions manually, please disable [Automatic Collection of Lifecycle Events](#7).
204+
[**NOTE**] If you want to manage sessions manually, please disable [Automatic Collection of Lifecycle Events](#7).
205+
206+
### 8.4 Setting common properties
219207

220-
##<a name="10"></a> 10. Integrate plugin sources
208+
Common properties are key-value-pairs that are added to all telemetry events, that are sent out.
209+
210+
```csharp
211+
// Set common properties
212+
Dictionary<string, string> commonProperties = new Dictionary<string, string> ();
213+
commonProperties.Add ("Common Key", "Common Property Value");
214+
ApplicationInsights.SetCommonProperties (commonProperties);
215+
```
216+
217+
[**NOTE**] Depending on the platform your are running on, the common property API behaves is slightly different. While it is possible to set those properties at any time if your app is running on iOS, you can only set common properties on Android between the `Setup()` and `Start()` call (otherwise the call will just be ignored).
218+
219+
##<a name="9"></a> 9. Integrate plugin sources
221220

222221
There are several ways to integrate the Application Insights Xamarin SDK into your app. The recommend way is to use the NuGet-package. However, you can also integrate the SDK by importing the sources:
223222

@@ -248,7 +247,7 @@ There are several ways to integrate the Application Insights Xamarin SDK into yo
248247

249248
4. Follow instructions in [4.2](#4)..
250249
251-
##<a name="11"></a> 11. Troubleshooting
250+
##<a name="10"></a> 10. Troubleshooting
252251

253252
### SDK references broken
254253

@@ -261,6 +260,7 @@ If you plan to support *iOS* you currently need to make a direct call to the iOS
261260
```csharp
262261
AI.XamarinSDK.iOS.ApplicationInsights.Init();
263262
```
264-
##<a name="12"></a> 12. Contact
265-
266-
If you have further questions or are running into trouble that cannot be resolved by any of the steps here, feel free to contact us at [AppInsights-Xamarin@microsoft.com](mailto:AppInsights-Xamarin@microsoft.com)
263+
264+
##<a id="11"></a> 11. Contact
265+
266+
If you have further questions or are running into trouble that cannot be resolved by any of the steps here, feel free to open a GitHub issue here or contact us at [support@hockeyapp.net](mailto:support@hockeyapp.net)

0 commit comments

Comments
 (0)