Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: implement sentryForFrontend #15433

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

zyoshoka
Copy link
Contributor

@zyoshoka zyoshoka commented Feb 8, 2025

What

.config/default.yml にコメントとしてのみ存在している sentryForFrontend を動くようにしました。

Why

  • 設定項目として存在するのに動かないのは変なため
  • フロントエンドのエラートラッキングがしたいため

Additional info (optional)

動作確認は .config/default.yml

sentryForFrontend:
  enableBrowserTracing: true
  enableReplay: true
  options:
    dsn: 'https://[email protected]/0'

と書いた上で起動、クライアントを開いて o0.ingest.sentry.io にリクエストが飛んでいることをブラウザコンソールから確認できれば OK と思います。

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR labels Feb 8, 2025
Copy link
Contributor

github-actions bot commented Feb 8, 2025

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -83346,6 +83346,37 @@
           "translatorAvailable": {
             "type": "boolean"
           },
+          "sentryForFrontend": {
+            "type": [
+              "object",
+              "null"
+            ],
+            "properties": {
+              "options": {
+                "type": "object",
+                "properties": {
+                  "dsn": {
+                    "type": "string"
+                  }
+                },
+                "additionalProperties": true,
+                "required": [
+                  "dsn"
+                ]
+              },
+              "enableBrowserTracing": {
+                "type": "boolean"
+              },
+              "enableReplay": {
+                "type": "boolean"
+              }
+            },
+            "required": [
+              "options",
+              "enableBrowserTracing",
+              "enableReplay"
+            ]
+          },
           "mediaProxy": {
             "type": "string"
           },
@@ -83458,6 +83489,7 @@
           "enableEmail",
           "enableServiceWorker",
           "translatorAvailable",
+          "sentryForFrontend",
           "mediaProxy",
           "enableUrlPreview",
           "backgroundImageUrl",

Get diff files from Workflow Page

Copy link

codecov bot commented Feb 8, 2025

Codecov Report

Attention: Patch coverage is 48.33333% with 31 lines in your changes missing coverage. Please review.

Project coverage is 40.33%. Comparing base (e339293) to head (da68a29).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/boot/main-boot.ts 0.00% 30 Missing ⚠️
...ges/backend/src/core/entities/MetaEntityService.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #15433   +/-   ##
========================================
  Coverage    40.33%   40.33%           
========================================
  Files         1611     1611           
  Lines       210678   210733   +55     
  Branches      4083     4049   -34     
========================================
+ Hits         84972    84996   +24     
- Misses      125064   125095   +31     
  Partials       642      642           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zyoshoka zyoshoka marked this pull request as draft February 9, 2025 07:01
@zyoshoka
Copy link
Contributor Author

zyoshoka commented Feb 9, 2025

ビルド時に .config/default.yml を必要とする構成にしてしまうと Docker イメージで運用している場合に上手くいかなさそうなので、meta とかから設定を持ってくる方向性に変更しようと思います(ので一旦 draft 化)

@zyoshoka zyoshoka changed the title enhance(frontend): implement sentryForFrontend enhance: implement sentryForFrontend Feb 9, 2025
@zyoshoka zyoshoka marked this pull request as ready for review February 9, 2025 09:56
@zyoshoka zyoshoka marked this pull request as draft February 9, 2025 09:58
@zyoshoka zyoshoka marked this pull request as ready for review February 9, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js
Projects
Development

Successfully merging this pull request may close these issues.

2 participants