sentry-javascript

repository·develop·Indexed 27 days ago

https://github.com/getsentry/sentry-javascript

Official Sentry SDKs for JavaScript, providing error monitoring, performance tracking, and session replay across browsers, Node.js, and modern web frameworks. This documentation includes guides for developing and running Browser SDK integration tests using Playwright and managing End-to-End (E2E) test applications for various frameworks including Angular, Astro, and Remix.

Tokens
165.3K
Snippets
509
Records
1K
Agent score
92%

What's inside sentry-javascript

  1. Overview of web-vitals metrics

    develop

    The web-vitals utility is a modular library used to measure Core Web Vitals on real users. It is vendored from the Google Chrome web-vitals library and is specifically designed to work with the @sentry/browser browserTracingIntegration.

    Note that this version has been modified to report metrics only once per page load, and logic regarding BFCache and multiple reports has been removed to ensure compatibility with Sentry's tracing.

  2. Overview of @sentry/server-utils

    develop

    The @sentry/server-utils package provides common server-only utilities used by various Sentry JavaScript server SDKs, including node, bun, deno, cloudflare, aws-serverless, google-cloud-serverless, and vercel-edge.

    WARNING

    This package is an internal library intended for use by Sentry-owned JavaScript SDK packages. It is not part of the public API contract and may change in any release. Do not rely on SemVer compatibility if you depend on it directly.

  3. Overview of @sentry/eslint-plugin-sdk

    develop

    The @sentry/eslint-plugin-sdk is the official ESLint plugin for Sentry SDKs.

    Warning: This package is an internal library intended for use by Sentry-owned JavaScript SDK packages and repositories. It is not part of the public API contract and may change in any release. It is not recommended to depend on it directly as SemVer compatibility is not guaranteed.

  4. Use Sentry Bundler Plugins for sourcemap uploads and release management

    develop

    Sentry provides specialized plugins for various bundlers to automate error tracking workflows. These plugins enable:

    • Sourcemap upload: Automatically uploading sourcemaps to Sentry so errors are readable.
    • Release creation: Creating new releases in your Sentry project.
    • Automatic release name discovery: Detecting release names based on your CI environment (Vercel, AWS, Heroku, CircleCI) or the current Git SHA.
    • Release injection: Automatically associating errors with the correct release.

    Depending on your build tool, install and use the corresponding package:

  5. Understand the purpose of @sentry/core

    develop

    The @sentry/core package provides the foundational interface definitions, base classes, and utilities used to build specific Sentry JavaScript SDKs, such as @sentry/node or @sentry/browser.

    Note: This package is intended as a base for SDK development. Most end-users should use specialized SDKs (like @sentry/browser or @sentry/node) rather than interacting with @sentry/core directly. Most exported classes and functions in this package are considered internal to the SDK ecosystem.

  6. Sentry integration features in Vue TanStack Router

    develop

    This application demonstrates how @sentry/vue integrates with TanStack Router to provide the following capabilities:

    • TanStack Router browser tracing integration: Automatic instrumentation of router activities.
    • Pageload transaction tracking: Tracking page loads with support for parameterized routes.
    • Navigation transaction tracking: Capturing transactions during route changes.
    • Route parameter extraction and span attribution: Automatically extracting parameters from routes and attributing them to Sentry spans.
  7. Verify Sentry User Feedback with Next.js 16

    develop

    This test application is designed to verify the functionality of the Sentry User Feedback SDK within a Next.js 16 environment. It specifically validates the following feedback APIs and behaviors:

    • attachTo(): Attaching feedback triggers to custom buttons.
    • createWidget(): Creating and removing feedback widget triggers.
    • createForm(): Creating feedback forms with custom labels.
    • captureFeedback(): Programmatic submission of feedback.
    • Sentiment tagging: Verifying ThumbsUp and ThumbsDown sentiment.
    • Dialog cancellation: Ensuring the feedback dialog can be cancelled correctly.
  8. Privacy and PII in Sentry Profiling

    develop

    The Sentry Node.js profiler is designed to avoid collecting Personally Identifiable Information (PII) by not collecting function arguments. It only collects a subset of values that may identify the device and OS (which are typically already collected if you are using Sentry tracing).

    Note: A potential risk for PII leakage exists only if you dynamically create or name functions using PII (e.g., using eval with PII in the function name), as function names may be reported to Sentry.