Socket
Socket
Sign inDemoInstall

@sentry/babel-plugin-component-annotate

Package Overview
Dependencies
0
Maintainers
11
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @sentry/babel-plugin-component-annotate

A Babel plugin that annotates frontend components with additional data to enrich the experience in Sentry


Version published
Weekly downloads
965K
increased by11.53%
Maintainers
11
Created
Weekly downloads
 

Changelog

Source

2.19.0

  • feat: Don't use word "error" in log message about telemetry (#548)
  • feat(core): Detect releases from more providers (#549)
  • fix: Always delete files when sourcemaps.filesToDeleteAfterUpload is set (#547)
  • fix(vite): Fix environment variable loading issue for Windows (#545)

Work in this release contributed by @Rassilion, and @mateusz-daniluk-xtb. Thank you for your contributions!

Readme

Source

Sentry

Sentry Babel Component Annotate Plugin

npm version npm dm npm dt

A Babel plugin that automatically annotates your output DOM with their respective frontend component names. This will unlock the capability to search for Replays in Sentry by component name, as well as see component names in breadcrumbs and performance monitoring. Please note that your Sentry JavaScript SDK version must be at least 7.91.0 to take advantage of these features. Currently, this plugin only works with React, and will exclusively parse .jsx and .tsx files.

Note

This plugin comes included in Sentry's bundler plugins, alongside many other features to improve your Sentry workflow. It can be downloaded individually, but it is recommended that you install the bundler plugins for your respective bundler, and enable this feature through the config object.

Check out the supported bundler plugin packages for installation instructions:

Installation

Using npm:

npm install @sentry/babel-plugin-component-annotate --save-dev

Using yarn:

yarn add @sentry/babel-plugin-component-annotate --dev

Using pnpm:

pnpm add @sentry/babel-plugin-component-annotate --save-dev

Example

// babel.config.js

{
  // ... other config above ...

  plugins: [
    // Put this plugin before any other plugins you have that transform JSX code
    ['@sentry/babel-plugin-component-annotate']
  ],
}

Or alternatively, configure the plugin by directly importing it:

// babel.config.js

import componentNameAnnotatePlugin from '@sentry/babel-plugin-component-annotate';

{
  // ... other config above ...

  plugins: [
    // Put this plugin before any other plugins you have that transform JSX code
    [componentNameAnnotatePlugin]
  ],
}

More information

Keywords

FAQs

Last updated on 19 Jun 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc