Setting the User Context App Insights for React Native



我们有一个React Native应用程序,我们正在使用;applicationinsights react native package";,从某种意义上说,这一切都很好,但我们正试图开始使用使用用户ID的监控端。现在我非常确信,无论(应用程序洞察(包用于用户ID的用户ID是什么,如果我们保留它,都不会造成太多问题,但这是不对的。

ApplicationInsights类有一个setAuthenticatedUserContext方法,但是注释似乎引用了cookie,表明它是一个重新使用的React包,GitHub发布了https://github.com/microsoft/appcenter-sdk-react-native/issues/503建议我们不能使用它,但是响应是针对我们没有使用的React Natve AppCenter包。我们直接使用App Insights。

所以我想知道,如果我们直接从React Native应用程序中使用App Insights,是否有办法设置我们的user_Id/user上下文?

如果您直接与App Insights对话,而不是通过Appcenter,那么setAuthenticatedUserContext似乎确实有效,它现在也可能通过Appcenter工作,我还没有测试过,所以我不确定。

如果你想检查这是否在App Insighst端结束,它会显示为一个名为user_AuthenticatedId的属性。

最新更新