Appcenter: SetUserId for Analytics events

Created on 6 Feb 2019  路  31Comments  路  Source: microsoft/appcenter

It's not clear what scope AppCenter.SetUserId applies to. It is documented anywhere? When I set it, I don't see any user IDs in my events exported to Application Insights. A post today mentions user IDs in the context of crashes, but not events.

It would be useful for the user ID to be incorporated into both AppCenter's dashboard for events and its export of events to Application Insights.

Version 1.13.0

analytics feature request reviewed-DRI

Most helpful comment

It's been more than a year since this request was posted. Is there any ETA? If not, any recommendations on how to workaround this is deeply appreciated. Thanks

All 31 comments

Hello, thanks for your feedback!

User ID can only be applied to Diagnostics (crashes, errors) for now.

We will probably be extending support for events, sessions and other analytics data, but there is no ETA for it just yet. We will tag your request for future consideration. Thanks for bringing this up.

@breyed the AppCenter.SetUserId API is documented at Identify users.

For now, it would be good to focus on ensuring the docs prevent further confusion. It's probably just a matter of ensuring the XML comments are complete and getting them into the NuGet package (#818).

Good point about the "Identify users" docs. Unfortunately, they're not easily discoverable if you happened to notice SetUserId in the process of coding.

While the docs there say that the user ID is used in crash reporting, they don't say that it's not used elsewhere. On one hand, since only crash reporting is mentioned, one could assume that's all it's used for. On the other hand, the API isn't in the Crashes namespace, which you might expect for something specific to crashes. So it's probably best in this case to be explicit.

Thank you - that's definitely a fair point. We will do a docs update incorporating your feedback.

Looking at this very thing right now, the ability to the a User/SessionID against an event for analysis in Azure Application Insights would be a big benefit.

Thanks Mackayn, This is definitely in our radar, adding this to feature request.

@hamswan just wanting to understand when you think this feature request will drop? I'm looking at this exact "issue" now and didn't want to use a custom property if this was going to be delivered within the coming weeks. Thanks

@brad-dixon We don't have an ETA yet but this is definitely in our close radar. Do you mind sharing your specific use case?

@hamswan nothing specific apart from there already being a placeholder within the properties being sent to App Insights from AppCenter Analytics. Given I only have a total of 20 additional attributes I can use, it would be nice to get 1 back given the UserId is already existence in the standard properties. It would also just mean it's consistent across the app and the SDK. I didn't figure it'd be a huge piece of work so would just be nice to see included. Loving AppCenter so far.

@brad-dixon Great to hear that you love App Center so far. I have added this to our Feature request backlog. would you benefit seeing userId attached to the logs flow? Will that be valuable for you?

@hamswan definitely for the log flow as well, yes. To see real time activity and who that activity is attached to is definitely beneficial, or at least, I don't see any downside and I believe it would become a useful insight at some time. So yes, I am all for that. As for the events and overview page, I have no real opinion on that. Our main source of the reporting for this data will come from Azure App Insights so that's very much our main concern. Massive appreciation on picking up this enhancement, always love that MS listen to their community/customers.

Stopping by to agree with everyone else: value from SetUserId() should be passed through to AppInsights consistently across Crashes and Analytics, otherwise we have to send the same value separately to correlate sessions back to our users.

This correlation problem is exacerbated by HandledErrorLog and StartServiceLog events having session_Id of 00000000-0000-0000-0000-000000000000. For example, the following series of events has the same AppInsights user_Id, with mix of missing UserId or session_Id:

image

Update: turns out UnhandledErrorLog does pass along both UserId and session_Id.

@hamswan sorry to bother again but are we any closer to having an ETA? It looks as though it's yet to move passed "feature-request" stage. Let me know! Thanks

Would be great to have this updated if possible, i just stumbled on it confused as to why my user ID wasn't matching up in my testing. At least I can add the custom property, but it would be good for consistency to be in the standard userId field!

+1

pls and ty

@eslynunezk4 To show interest, you can click the thumbs up on the initial issue comment. That lets GitHub count up interest automatically and avoids issue subscribers (like me) from getting +1 emails. 馃槃

Why does the JSON from azure blob storage show UserId with value "none"? as if I can change it by assigning something to it. I understand that setting UserId now is only for Diagnostics but why show it in the JSON.
Screenshot 2020-02-17 at 16 30 33

It's been more than a year since this request was posted. Is there any ETA? If not, any recommendations on how to workaround this is deeply appreciated. Thanks

It's been more than a year since this request was posted. Is there any ETA? If not, any recommendations on how to workaround this is deeply appreciated. Thanks

@ChintanBP, I agree but I'm not looking for a workaround, I think the request to provide this is functionality is very fair, should be relatively straight forward yet it still hasn't happened. Hoping to have been given an update before the end of the week.

It's been more than a year since this request was posted. Is there any ETA? If not, any recommendations on how to workaround this is deeply appreciated. Thanks

@ChintanBP, I agree but I'm not looking for a workaround, I think the request to provide this is functionality is very fair, should be relatively straight forward yet it still hasn't happened. Hoping to have been given an update before the end of the week.

@brad-dixon - Thanks for responding. It feels good to know my request is being considered. Are you able to provide any udpate? Sorry for pushing, but this information is crucial in the POC that I am doing, and will be one of the points considered for selecting the right strategy for our platform.

Hello, did anyone found a workaround ? Any news on the subject ?

Why does the JSON from azure blob storage show UserId with value "none"? as if I can change it by assigning something to it. I understand that setting UserId now is only for Diagnostics but why show it in the JSON.
Screenshot 2020-02-17 at 16 30 33

We have exactly the same probleme as @GwnElviin and we indeed use AppCenter.SetUserId, how can i change this userId field in order to use it to identify every individuals users inside my blob storage export ?
The only workarround we found is to pass a userId value in properties

I was also under the impression that SetUserId would in fact, you know, set the user id. I have both the concept of a user and a session in my app and I would like for Application Insights to understand them.

  • What is the workaround in the time being until SetUserId sets the user id in Application Insights?
  • Will SetUserId ever start to work as expected?
  • Is App Center dead, considering the total lack of communication and implementation of trivial but absolutely essential features? If it is getting the axe please communicate of an alternative.

Thanks.

@Tommigun1980

The workaround posted by @fr0xy works just fine. If you're querying on the data in Application Insights, you can just extend the CustomProperties attribute with the following query:

| extend properties = todynamic(tostring(customDimensions.Properties))
| extend userID = tostring(properties.UserID) // assuming you named the property UserID on the client side
| where isnotempty(userID) // this will be empty if you haven't set it as a property in the SDK

I have no authority to answer the other two questions, but I'd hope that for our sake, App Center is nowhere near "dead".

@Tommigun1980

The workaround posted by @fr0xy works just fine. If you're querying on the data in Application Insights, you can just extend the CustomProperties attribute with the following query:

| extend properties = todynamic(tostring(customDimensions.Properties))
| extend userID = tostring(properties.UserID) // assuming you named the property UserID on the client side
| where isnotempty(userID) // this will be empty if you haven't set it as a property in the SDK

I have no authority to answer the other two questions, but I'd hope that for our sake, App Center is nowhere near "dead".

Hi.

The problem with that workaround is that all built-in visualisations in Application Insights don't show real data.
For example the retention viewer is operating on the concept of a user which is NOT the one I am providing, hence it's not showing real data. This makes the built-in visualisations that operate on a per-user level in Application Insights not usable.

Thanks.

Is there any ETA on this feature? Is this going to be released anytime soon. Can someone confirm if built in visualisation will accept a user ID from custom properties as userId

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

Still an active issue.

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

Please don't close, as above, this is still an issue people are keen to have resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patrickdoodyIRL picture patrickdoodyIRL  路  3Comments

galfonso777 picture galfonso777  路  3Comments

sindresorhus picture sindresorhus  路  3Comments

egorikftp picture egorikftp  路  3Comments

vonovak picture vonovak  路  3Comments