Azure Insights telemetry not showing Auth ID on all transactions

二次信任 提交于 2019-12-08 05:03:00

问题


I'm trying to integrate Azure Insights telemetry with our SPA and trying to add authenticated user tracing. For this, after logging in, I call ReactAI.ai().setAuthenticatedUserContext(user_id). I can see the user_id on that specific trace, but not on subsequent ones. If I grab the session id in that trace, I can reconstitute the user journey, but would ideally like to not go through the extra step of figuring out the session id.


回答1:


The full signature of the method would be:

setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false)

You would need to set storeInCookie to true to make sure UserId is preserved across traces.

This cookie was marked as non-essential upon cookies review as per the new cookie laws and could not be an on-by-default cookie. I think you'd need "Cookie statement" on the site if you'd drop this.



来源:https://stackoverflow.com/questions/54925197/azure-insights-telemetry-not-showing-auth-id-on-all-transactions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!