Is anyone using application insights with Nuxt 3?
Does anyone have applications insights working with Nuxt to track and log on the client and server?
I'm having problems to setup it for the server and I'm not sure if it's related to the fact that the package doens't have support for ESM
I have created a nitro plugin, but when running the build preview I get an error saying that cannot find the module 'applicationinsights'
This is how we import the module and it's works on our Vue 3 SSR project
`
Thanks
8 Replies
here's the full code
I'd use @chakraecho's module for that - https://github.com/huang-julien/nitro-applicationinsights
GitHub
GitHub - huang-julien/nitro-applicationinsights: Application insigh...
Application insights plugin for nitro. Contribute to huang-julien/nitro-applicationinsights development by creating an account on GitHub.
thanks @manniL / TheAlexLichter
@Victor Neves there's also a nuxt integration with client + server support :
nuxt-applicationinsights
thanks @chakraecho
@chakraecho
If I correctly understood, the one that @manniL / TheAlexLichter mentioned is a module just for the server side, while the one that you mention can handle server and client, right?
yup, nuxt-applicationinsights just provides nitro-applicationinsights + @microsoft/application-insihgts-web
@chakraecho
I think I have checked everywhere but I don't see where/how I pass the instrumentationKey and other parameters as IngestionEndpoint and LiveEndpoint
ApplicationInsights:An invalid instrumentation key was provided. There may be resulting telemetry loss [ undefined ]
We currently only accept connection strings. You can set it into the nuxt config
applicationInsights.connectionString