Skip to content

feat: APMテレメトリ基盤 - #487

Draft
Ojoxux wants to merge 1 commit into
mainfrom
cursor/telemetry-apm-foundation-9850
Draft

feat: APMテレメトリ基盤#487
Ojoxux wants to merge 1 commit into
mainfrom
cursor/telemetry-apm-foundation-9850

Conversation

@Ojoxux

@Ojoxux Ojoxux commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Pull Request 概要

ブラウザの console.log 氾濫(SON-10)への対応として、APM 連携の土台となるテレメトリ基盤を追加する。デバッグログは本番で破棄し、エラー・警告のみ外部サービスへ転送できる構成にする。

変更内容

  • packages/utilscreateLogger を追加(レベル制御・シンク差し替え可能)
  • apps/web/src/lib/telemetrycreateClientLogger を追加
    • dev: debug/info はコンソール出力
    • prod: debug/info は破棄、warn/error は Sentry シンクへ(DSN 未設定時は no-op)
  • apps/apicaptureException プレースホルダーと SENTRY_DSN 型定義を追加
  • monitoring.ts の Sentry 連携 TODO を captureException 呼び出しに接続
  • .env.example に Sentry 関連の環境変数を追記

動作確認

  1. npm run build --workspace=@sonory/utils が成功すること
  2. npm run type-check --workspace=@sonory/web が成功すること
  3. npm run type-check --workspace=@sonory/api が成功すること
  4. DSN 未設定時、既存の console.log 動作に影響がないこと

関連Issue

レビューポイント

  • 本番で debug/info がコンソールに出ない設計になっているか
  • PII(位置情報・音声 URL)を context に載せない旨が TSDoc に記載されているか
  • SDK 本体の導入は feat: Sentry SDK の導入 #489 に分離している点
Open in Web Open in Cursor 

Add shared createLogger utility and client-side telemetry sinks so
debug console.log can be replaced with environment-aware logging.
Sentry hooks are stubbed for web (window.Sentry) and API (SENTRY_DSN)
until DSN is configured. Document observability env vars in .env.example.
@Ojoxux Ojoxux changed the title feat: APM向けテレメトリ基盤の追加(Sentry連携準備) feat: APMテレメトリ基盤 Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants