App Center equivalent for Insights.Identify

Hello,

I'm working on changing a Xamarin.Forms app to use Microsoft App Center with the impending retirement of Xamarin Insights. So far it seems to be going well, though I do have a question about it.

In the app currently, we were using Insights.Identify to provide additional helpful information to us when looking at the Insights logs, such as the name of the user that has logged in, and the system that they're connecting to. I've been trying to find the equivalent for this in Microsoft App Center, but I didn't find anything in any of the documentation of the APIs that I was reviewing, and there doesn't seem to be any methods provided in the App Center NuGet packages that handle this same functionality.

Is this feature not implemented in App Center yet or is there some other way to provide this information in App Center? I tried creating a CustomProperties object, setting some Key/Value pairs in the object, and then calling AppCenter.SetCustomProperties, but that didn't seem to help. Would the best option right now be to just pass an IDictionary object with the key/value pairs I want to include in the log when making calls to methods like Crashes.TrackError or Analytics.TrackEvent?

Thanks in advance!

Answers

  • tonywambatonywamba Member
    edited April 2018

    I had the same issue. As of now, the feature is not available in App Center and I hope they will add it asap as Xamarin Insight will be completely shut down soon.
    But since you can attach a log file or binary to a log,
    Here is what you can do to identify log entry:

    Crashes.GetErrorAttachments = (ErrorReport report) => { return new ErrorAttachmentLog[] { ErrorAttachmentLog.AttachmentWithText("UserID: " + UserID, "") }; };
    This will add the text "UserID: {SomeUserID}" to the log in App Center for each log and you can view it in the Attachment Tab

Sign In or Register to comment.