Skip to content

fix: Sentry 使用環境下にて、Misskey が発行した SQL クエリが span に含まれない問題を修正#17671

Merged
syuilo merged 5 commits into
misskey-dev:developfrom
samunohito:fix/17670-external-pg
Jul 6, 2026
Merged

fix: Sentry 使用環境下にて、Misskey が発行した SQL クエリが span に含まれない問題を修正#17671
syuilo merged 5 commits into
misskey-dev:developfrom
samunohito:fix/17670-external-pg

Conversation

@samunohito

Copy link
Copy Markdown
Member

What

pgをバックエンドのバンドルから除きます。

Why

fix #17670

Additional info (optional)

自分のSentryアカウントで確認済み

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 the packages/backend Server side specific issue/PR label Jul 5, 2026
@samunohito samunohito marked this pull request as ready for review July 5, 2026 12:14
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 5, 2026
Comment thread packages/backend/rolldown.config.ts
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

このPRによるapi.jsonの差分
差分はありません。
Get diff files from Workflow Page

@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.93%. Comparing base (3817f00) to head (f2f81b9).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #17671      +/-   ##
===========================================
+ Coverage    24.92%   24.93%   +0.01%     
===========================================
  Files         1165     1165              
  Lines        39730    39730              
  Branches     11060    11056       -4     
===========================================
+ Hits          9903     9907       +4     
+ Misses       23891    23888       -3     
+ Partials      5936     5935       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

⚙️ Backend Memory Usage Report

After GC

Metric Base Head Δ median Δ MAD Δ min Δ max
HeapUsed 83.8 MB
± 0 MB
84.1 MB
± 0 MB
$\color{orange}{\text{+0.3 MB}}$
$\color{orange}{\text{+0.3\%}}$
0 MB $\color{orange}{\text{+0.2 MB}}$ $\color{orange}{\text{+0.3 MB}}$
Pss 309.6 MB
± 0.4 MB
305.7 MB
± 1.4 MB
$\color{green}{\text{-1.3 MB}}$
$\color{green}{\text{-0.4\%}}$
2.6 MB $\color{green}{\text{-91.6 MB}}$ $\color{orange}{\text{+1.7 MB}}$
Private_Dirty 266.4 MB
± 0.3 MB
262.7 MB
± 1.4 MB
$\color{green}{\text{-1.3 MB}}$
$\color{green}{\text{-0.5\%}}$
2.4 MB $\color{green}{\text{-91.6 MB}}$ $\color{orange}{\text{+2 MB}}$
VmRSS 347.5 MB
± 0.4 MB
343.7 MB
± 1.3 MB
$\color{green}{\text{-1.2 MB}}$
$\color{green}{\text{-0.3\%}}$
2.6 MB $\color{green}{\text{-91.6 MB}}$ $\color{orange}{\text{+1.6 MB}}$
External 10.7 MB
± 0 MB
10.7 MB
± 0 MB
$\text{-0.1 MB}$
$\color{green}{\text{-0.8\%}}$
0 MB $\text{-0.1 MB}$ $\text{-0.1 MB}$

V8 Heap Snapshot Statistics

Metric Base Head Δ median Δ MAD Δ min Δ max
$\color{gray}{\rule{8pt}{8pt}}$ Total 102 MB
± 7.9 KB
102 MB
± 24 KB
$\text{+68 KB}$
$\text{+0.1\%}$
25 KB $\text{+39 KB}$ $\color{orange}{\text{+112 KB}}$
$\color{orange}{\rule{8pt}{8pt}}$ Code24.5% → 24.5%
25 MB 25 MB $\text{-24 KB}$ 3.9 KB $\text{-28 KB}$ $\text{-13 KB}$
$\color{red}{\rule{8pt}{8pt}}$ Strings42.1% → 42.2%
43 MB 43 MB $\text{+76 KB}$ 1.6 KB $\text{+73 KB}$ $\text{+77 KB}$
$\color{cyan}{\rule{8pt}{8pt}}$ JS arrays4.1% → 4.1%
4.1 MB 4.1 MB $\text{+10 KB}$ 0 B $\text{+10 KB}$ $\text{+10 KB}$
$\color{green}{\rule{8pt}{8pt}}$ Typed arrays0.5% → 0.5%
533 KB 533 KB 0 B 0 B 0 B 0 B
$\color{yellow}{\rule{8pt}{8pt}}$ System objects2.2% → 2.2%
2.2 MB 2.2 MB $\text{+4.4 KB}$ 2.7 KB $\text{+696 B}$ $\text{+10 KB}$
$\color{violet}{\rule{8pt}{8pt}}$ Other JS objs26.6% → 26.6%
27 MB 27 MB $\text{-10 KB}$ 13 KB $\text{-23 KB}$ $\text{+29 KB}$
$\color{pink}{\rule{8pt}{8pt}}$ Other non-JS objs0% → 0%
38 KB 38 KB $\text{+256 B}$ 0 B $\text{+256 B}$ $\text{+256 B}$
Head heap snapshot composition
%%{init: {"sankey":{"showValues":false,"linkColor":"target","labelStyle":"outlined","nodeAlignment":"center","nodePadding":10,"nodeColors":{"Head":"#888888","code":"#f28e2c","bytecode":"#f28e2c","Other":"#888888","strings":"#e15759","string":"#e15759","jsArrays":"#76b7b2","typedArrays":"#59a14f","systemObjects":"#edc949","otherJsObjects":"#af7aa1","array":"#af7aa1","otherNonJsObjects":"#ff9da7"}}}}%%
sankey-beta
"Head","Code",24.46
"Code","bytecode",8.08
"Code","Other",16.38
"Head","Strings",42.18
"Strings","string",41.6
"Strings","Other",0.58
"Head","JS arrays",4.07
"Head","Typed arrays",0.52
"Head","System objects",2.17
"Head","Other JS objs",26.56
"Other JS objs","array",9.76
"Other JS objs","Other",16.79
"Head","Other non-JS objs",0.04
Loading

Download representative V8 heap snapshot (head)

Runtime Loaded JS Footprint

Click to show
Metric Base Head Δ Δ (%)
Loaded JS modules 152 185 $\color{orange}{\text{+33}}$ $\color{orange}{\text{+21.7\%}}$
Loaded JS source 13 MB 13 MB $\color{orange}{\text{+68 KB}}$ $\color{orange}{\text{+0.5\%}}$
External packages loaded 19 30 $\color{orange}{\text{+11}}$ $\color{orange}{\text{+57.9\%}}$
Native addon packages 2 2 0 0%

Newly Loaded External Packages

Package Loaded JS Modules Notes
pg 8.22.0 75 KB 14
pg-protocol 1.15.0 32 KB 6
pg-pool 3.14.0 14 KB 1
pg-types 2.2.0 14 KB 5
pg-connection-string 2.14.0 7.5 KB 1
postgres-interval 1.2.0 3.4 KB 1
postgres-date 1.0.7 2.7 KB 1
postgres-array 2.0.0 2.3 KB 1
pg-int8 1.0.1 1.6 KB 1
postgres-bytea 1.0.1 863 B 1

Largest Package Increases

Package Base Head Δ Modules Δ
pg 8.22.0 0 B 75 KB $\color{orange}{\text{+75 KB}}$ $\color{orange}{\text{+14}}$
pg-protocol 1.15.0 0 B 32 KB $\color{orange}{\text{+32 KB}}$ $\color{orange}{\text{+6}}$
pg-pool 3.14.0 0 B 14 KB $\color{orange}{\text{+14 KB}}$ $\color{orange}{\text{+1}}$
pg-types 2.2.0 0 B 14 KB $\color{orange}{\text{+14 KB}}$ $\color{orange}{\text{+5}}$
pg-connection-string 2.14.0 0 B 7.5 KB $\color{orange}{\text{+7.5 KB}}$ $\color{orange}{\text{+1}}$
postgres-interval 1.2.0 0 B 3.4 KB $\color{orange}{\text{+3.4 KB}}$ $\color{orange}{\text{+1}}$
postgres-date 1.0.7 0 B 2.7 KB $\color{orange}{\text{+2.7 KB}}$ $\color{orange}{\text{+1}}$
postgres-array 2.0.0 0 B 2.3 KB $\color{orange}{\text{+2.3 KB}}$ $\color{orange}{\text{+1}}$
pg-int8 1.0.1 0 B 1.6 KB $\color{orange}{\text{+1.6 KB}}$ $\color{orange}{\text{+1}}$
postgres-bytea 1.0.1 0 B 863 B $\color{orange}{\text{+863 B}}$ $\color{orange}{\text{+1}}$

Largest Newly Loaded Modules

Module Package Loaded JS
packages/backend/built/ApNoteService-B8AjcvCa.js backend 4 MB
packages/backend/built/Meta-CB5Fbo8K.js backend 1.3 MB
packages/backend/built/QueueService-uMx6gTGj.js backend 1 MB
packages/backend/built/ServerService-DCxLdszv.js backend 973 KB
packages/backend/built/endpoints-Cr-F3BR3.js backend 874 KB
packages/backend/built/MetaEntityService-C0W4xeRh.js backend 627 KB
packages/backend/built/ap-request-D9wJgnKv.js backend 237 KB
packages/backend/built/_-CN7qEBQD.js backend 81 KB
packages/backend/built/gen-spec-Dz4Cy5HD.js backend 57 KB
packages/backend/built/GlobalModule-BlMavh2Q.js backend 53 KB

@github-project-automation github-project-automation Bot moved this from Todo to Approved in [実験中] 管理用 Jul 5, 2026
@syuilo syuilo merged commit 7243bd3 into misskey-dev:develop Jul 6, 2026
39 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in [実験中] 管理用 Jul 6, 2026
@syuilo

syuilo commented Jul 6, 2026

Copy link
Copy Markdown
Member

🙏

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 size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

Sentryでpgのspanをトレースできていない

3 participants