error-tracking-nuxt

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PostHog error tracking for Nuxt

适用于Nuxt的PostHog错误追踪

This skill helps you add PostHog error tracking to Nuxt applications.
这个技能可帮助你为Nuxt应用添加PostHog错误追踪功能。

Reference files

参考文件

  • references/nuxt.md
    - Nuxt error tracking installation (v3.7 and above) - docs
  • references/fingerprints.md
    - Fingerprints - docs
  • references/alerts.md
    - Send error tracking alerts - docs
  • references/monitoring.md
    - Monitor and search issues - docs
  • references/assigning-issues.md
    - Assign issues to teammates - docs
  • references/upload-source-maps.md
    - Upload source maps - docs
Consult the documentation for API details and framework-specific patterns.
  • references/nuxt.md
    - Nuxt错误追踪安装指南(v3.7及以上版本)- 文档
  • references/fingerprints.md
    - 错误指纹 - 文档
  • references/alerts.md
    - 发送错误追踪告警 - 文档
  • references/monitoring.md
    - 监控与搜索问题 - 文档
  • references/assigning-issues.md
    - 向团队成员分配问题 - 文档
  • references/upload-source-maps.md
    - 上传源映射 - 文档
如需了解API详情和框架特定模式,请查阅相关文档。

Key principles

核心原则

  • Environment variables: Always use environment variables for PostHog keys and host URLs. Never hardcode them.
  • Minimal changes: Add error tracking alongside existing error handling. Don't replace or restructure existing error handling code.
  • Autocapture first: Enable exception autocapture in the SDK initialization before adding manual captures.
  • Source maps: Upload source maps so stack traces resolve to original source code, not minified bundles.
  • Manual capture for boundaries: Use
    captureException()
    at error boundaries and catch blocks for errors that don't propagate to the global handler.
  • 环境变量:始终使用环境变量存储PostHog密钥和主机URL,切勿硬编码。
  • 最小改动:在现有错误处理基础上添加错误追踪功能,不要替换或重构现有错误处理代码。
  • 自动捕获优先:在SDK初始化时启用异常自动捕获,再添加手动捕获逻辑。
  • 源映射:上传源映射,以便将堆栈跟踪解析为原始源代码,而非压缩后的打包文件。
  • 边界处手动捕获:在错误边界和catch代码块中使用
    captureException()
    捕获那些不会传播到全局处理器的错误。

Framework guidelines

框架指南

No specific framework guidelines.
无特定框架指南。