Socket
Socket
Sign inDemoInstall

@sentry/vite-plugin

Package Overview
Dependencies
Maintainers
11
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/vite-plugin

Official Sentry Vite plugin


Version published
Weekly downloads
722K
increased by4.92%
Maintainers
11
Weekly downloads
 
Created

What is @sentry/vite-plugin?

@sentry/vite-plugin is a Vite plugin that integrates Sentry's error tracking and performance monitoring into Vite projects. It helps in capturing and reporting errors, performance issues, and other telemetry data from your Vite-based applications.

What are @sentry/vite-plugin's main functionalities?

Error Tracking

This feature allows you to configure Sentry for error tracking in your Vite project. By providing your Sentry organization, project, and authentication token, you can automatically capture and report errors.

import { defineConfig } from 'vite';
import { sentryVitePlugin } from '@sentry/vite-plugin';

export default defineConfig({
  plugins: [
    sentryVitePlugin({
      org: 'your-org',
      project: 'your-project',
      authToken: 'your-auth-token',
      release: 'your-release',
      url: 'https://sentry.io/',
    }),
  ],
});

Source Maps Upload

This feature allows you to upload source maps to Sentry, which helps in better error tracking by providing readable stack traces. You need to specify the directory containing the source maps.

import { defineConfig } from 'vite';
import { sentryVitePlugin } from '@sentry/vite-plugin';

export default defineConfig({
  plugins: [
    sentryVitePlugin({
      org: 'your-org',
      project: 'your-project',
      authToken: 'your-auth-token',
      release: 'your-release',
      include: './dist',
      url: 'https://sentry.io/',
    }),
  ],
});

Performance Monitoring

This feature enables performance monitoring in your Vite project. By setting the `tracesSampleRate`, you can control the sampling rate for performance data collection.

import { defineConfig } from 'vite';
import { sentryVitePlugin } from '@sentry/vite-plugin';

export default defineConfig({
  plugins: [
    sentryVitePlugin({
      org: 'your-org',
      project: 'your-project',
      authToken: 'your-auth-token',
      release: 'your-release',
      url: 'https://sentry.io/',
      tracesSampleRate: 1.0,
    }),
  ],
});

Other packages similar to @sentry/vite-plugin

Keywords

FAQs

Package last updated on 19 Jun 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