
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
vue3-application-insights
Advanced tools
Vue 3 plugin to simplify integration with Azure Application Insights.
npm install vue3-application-insights
import { createApp } from "vue";
import { AppInsightsPlugin, AppInsightsPluginOptions } from "vue3-application-insights";
const aiOptions: AppInsightsPluginOptions = {
connectionString: "<your connection string>",
};
createApp(App).use(AppInsightsPlugin, aiOptions).mount("#app");
import { createApp } from "vue";
import router from "./router";
import { AppInsightsPlugin, AppInsightsPluginOptions } from "vue3-application-insights";
const aiOptions: AppInsightsPluginOptions = {
connectionString: "<your connection string>",
router: router,
trackAppErrors: true,
};
createApp(App).use(router).use(AppInsightsPlugin, aiOptions).mount("#app");
const aiOptions: AppInsightsPluginOptions = {
appInsightsConfig: {
// See Application Insights specifications: https://github.com/microsoft/ApplicationInsights-JS#configuration
config: {
connectionString: "<your connection string>",
},
},
router: router,
trackAppErrors: true,
};
const aiOptions: AppInsightsPluginOptions = {
connectionString: import.meta.env.VITE_APPLICATION_INSIGHTS_CONNECTION_STRING, // Get value from .env file
router: router,
appName: 'Vue + Vite app', // For route event to be like: [appName] <route.name>
trackAppErrors: true,
cloudRole: 'frontend',
cloudRoleInstance: 'vue-app',
onLoaded: (appInsights: ApplicationInsights) => {
// Custom changes for application insights
}
};
import { useAppInsights } from "vue3-application-insights";
const appInsights = useAppInsights();
appInsights.trackEvent({
name: "custom_event",
});
See official docs for sending custom telemetry to Azure Portal.
Name | Type | Required / Default value | Description |
---|---|---|---|
appInsightsInstance | ApplicationInsights | No* | Custom self made Application Insights instance to use. |
appInsightsConfig | Snippet | No* | Provide custom Application Insights configuration. |
connectionString | string | No* | Simply provide Application Insights connection string only. |
router | Router | No | Instance of Router (from vue-router) to track navigation between pages. The event name will have format: [appName] <route.name> |
appName | string | No | App name for router events. If not provided will not present in the event name. |
trackInitialPageView | boolean | No / False | Track initial page view or track it only when router is ready. |
trackAppErrors | boolean | No / False | Track global errors of the app. |
cloudRole | string | No | Name of the role the application is a part of. Maps directly to the role name in azure. |
cloudRoleInstance | string | No | Name of the instance where the application is running. Computer name for on-premises, instance name for Azure. |
onLoaded | (appInsights: ApplicationInsights) => void | No | Custom modifications / action to execute after Application Insights instance is created. |
*One of these three values should be set to connect with your Application Insights instance. If more than one is set the top one (based on the option list) will be used.
Inspired by vue-application-insights.
FAQs
Package to work with application insights.
The npm package vue3-application-insights receives a total of 649 weekly downloads. As such, vue3-application-insights popularity was classified as not popular.
We found that vue3-application-insights demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.