跳到正文
原文
Google AI:DEV 作者专属(RSS)· Karan·· 4 小时前AI 评分38

MetricFlow:一条 npx 命令在本地查看网站为何变慢(New Relic + Sentry)

One npx command to see why your website is slow (New Relic + Sentry on localhost)

AI 导读

MetricFlow 是一款跑在本地机器上的网站性能仪表盘,用 `npx @karan171996/metricflow` 即可启动,无需服务器和账号,密钥只留在本机。

正文

Karan

I'm building MetricFlow, a performance dashboard for your website that runs on your own machine. It shows real-user metrics from New Relic and JavaScript errors from Sentry side by side, per page, and can suggest what to fix first.

npx @karan171996/metricflow

That opens a dashboard at http://localhost:3000. There is no MetricFlow server and no account to create. Your keys stay on your machine.

Status: early, work in progress. Things will change, and feedback is very welcome.

MetricFlow dashboard with sample data

Sample data, not real numbers.

What you get

  • Dashboard: average response time, error rate, throughput and Apdex, plus TTFB, LCP and CLS cards with trends and a "what moved since the last check" list.
  • Performance hub: every tracked page with its health (Healthy, Warning or Critical) and a detail view per page.
  • Tool pages: New Relic numbers only, or Sentry errors only, per page.
  • AI suggestions (optional): Gemini, Claude or OpenAI turns your numbers into a short "fix this first" list. Bring your own key.

Performance hub with sample data

Try it in four steps

  1. Start it: npx @karan171996/metricflow. The first run shows "Connect your data".
  2. Add your keys: a New Relic User API key and account ID, and a Sentry auth token, organization slug and project slug. Paste them on the Setup page or put them in a .env.local file.
  3. Send data from your site: MetricFlow only reads. The /connect page gives you copy-paste snippets for the New Relic Browser agent and Sentry.
  4. Check that data arrives: the same page shows a row per source that turns green when events come in. Then open the dashboard.

You need Node >=20.12. New Relic and Sentry both have free plans, which is enough to try it.

Good to know

  • It is early software. Expect rough edges.
  • It is a local tool, not a hosted service. It runs on your machine while you use it.
  • Everything runs with your own keys, and nothing is sent anywhere except to New Relic, Sentry and, if you turn it on, your chosen AI provider.

Try it and tell me what you think

If you run it against your own site, I'd like to hear what was confusing in setup and which numbers you expected to see and didn't. Leave a comment below.

来源:Google AI:DEV 作者专属(RSS) · dev.to