Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/vue

Package Overview
Dependencies
Maintainers
11
Versions
361
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/vue

Official Sentry SDK for Vue.js

  • 8.38.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
569K
decreased by-3.32%
Maintainers
11
Weekly downloads
 
Created

What is @sentry/vue?

@sentry/vue is an official Sentry SDK for Vue.js applications. It allows developers to monitor and track errors, performance issues, and other events in their Vue.js applications. The package provides seamless integration with Vue.js, enabling automatic error tracking and performance monitoring.

What are @sentry/vue's main functionalities?

Error Tracking

This feature allows you to initialize Sentry in your Vue.js application to automatically capture and report errors. The `dsn` is your Sentry Data Source Name, which uniquely identifies your project.

import * as Sentry from '@sentry/vue';
import { Integrations } from '@sentry/tracing';
import Vue from 'vue';

Sentry.init({
  Vue: Vue,
  dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0',
  integrations: [new Integrations.BrowserTracing()],
  tracesSampleRate: 1.0,
});

Performance Monitoring

This feature allows you to monitor the performance of your Vue.js application. You can track custom transactions and measure the performance of specific parts of your application.

import * as Sentry from '@sentry/vue';
import { Integrations } from '@sentry/tracing';
import Vue from 'vue';

Sentry.init({
  Vue: Vue,
  dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0',
  integrations: [new Integrations.BrowserTracing()],
  tracesSampleRate: 1.0,
});

// Example of a custom transaction
const transaction = Sentry.startTransaction({
  op: 'test',
  name: 'My Custom Transaction',
});

setTimeout(() => {
  transaction.finish();
}, 99);

Manual Error Reporting

This feature allows you to manually capture and report exceptions in your Vue.js application. This is useful for capturing errors that are not automatically caught by Sentry.

import * as Sentry from '@sentry/vue';
import Vue from 'vue';

Sentry.init({
  Vue: Vue,
  dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0',
});

// Manually capture an exception
try {
  throw new Error('This is a test error');
} catch (error) {
  Sentry.captureException(error);
}

Other packages similar to @sentry/vue

FAQs

Package last updated on 12 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc