How to add Microsoft/Azure Application Insights to Remix app for monitoring UI metrics #6716
Unanswered
kevinreber
asked this question in
Q&A
Replies: 2 comments
-
Hey, I know it's been a while but... any chance you figured this out @kevinreber? 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I would like to know too. I'm running remix in a nx repo, and running remix-express is a hazzle with overriding commands etc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Does anyone have any experience setting up Remix with
Application Insights
to monitor user data on their UI? Our code snippet below seems to work/monitor user metrics fine, but we'd like to see other opinions/solutions.NOTE: This question is related to monitoring user data through the UI, not how to monitor user data through the server
Setting up
Application Insights
for UI metricsWe have 2 packages to help monitor user metrics using Azure's
Application Insights
@microsoft/applicationinsights-react-js
@microsoft/applicationinsights-web
From what we understand, to use
Application Insights
everything must be initialized on the client side (Example code snippet below)If possible we'd like to avoid wrapping
appInsights.setAuthenticatedUserContext(username)
inside of auseEffect()
. We've triedappInsights.setAuthenticatedUserContext(username)
inside the pageloader()
(example below)but
setAuthenticatedUserContext()
doesn't work inside of the pageloader()
Resources
App Insights
in React: https://learn.microsoft.com/en-us/azure/azure-monitor/app/javascript-framework-extensions?tabs=reactBeta Was this translation helpful? Give feedback.
All reactions