<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>New-Relic on Tarragon</title><link>https://tarrragon.github.io/blog/tags/new-relic/</link><description>Recent content in New-Relic on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Tue, 19 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/new-relic/index.xml" rel="self" type="application/rss+xml"/><item><title>New Relic → Datadog：APM schema 對位 + agent 替換 + dashboard 重建</title><link>https://tarrragon.github.io/blog/backend/04-observability/vendors/datadog/migrate-from-new-relic/</link><pubDate>Tue, 19 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/backend/04-observability/vendors/datadog/migrate-from-new-relic/</guid><description>&lt;blockquote>
&lt;p>本文是跨 vendor migration playbook、cross-link &lt;a href="https://newrelic.com/">New Relic&lt;/a> 跟 &lt;a href="https://tarrragon.github.io/blog/backend/04-observability/vendors/datadog/" data-link-title="Datadog" data-link-desc="All-in-one SaaS 觀測平台、APM / Logs / Metrics / RUM / Security">Datadog&lt;/a>。跑 &lt;a href="https://tarrragon.github.io/blog/posts/migration-playbook-%E6%96%B9%E6%B3%95%E8%AB%96%E7%9A%84%E6%BC%94%E5%8C%96%E7%B4%80%E9%8C%84stage-0-variant-%E8%A6%8F%E5%8A%83%E6%8A%8A-collapse-%E7%8E%87%E5%BE%9E-60-%E9%99%8D%E5%88%B0-0/" data-link-title="Migration Playbook 方法論的演化紀錄：Stage 0 variant 規劃把 collapse 率從 60% 降到 0%" data-link-desc="跨 vendor migration playbook 需要獨立寫作方法論的依據，以及這套方法論從三輪 batch dogfood 中演化出來的驗證證據。">migration-playbook-methodology 6 維 audit&lt;/a> 後對映 &lt;em>Schema = High（NRQL ↔ Datadog query、APM agent 不同）→ Type A phased translation&lt;/em>。&lt;/p>&lt;/blockquote>
&lt;h2 id="問題情境">問題情境&lt;/h2>
&lt;p>中型 SaaS 跑 New Relic 3-5 年、production observability 飽和、團隊發現幾個問題：cost 暴漲（per-host APM + custom event + synthetic）、APM trace 對 Kubernetes-native workload 不夠細、跟 PagerDuty / Slack integration 雖然有但 latency 偏高。同期 Datadog 在 K8s monitoring + APM 端深度整合、cost model 在 100-500 host 規模更可預測。&lt;/p>
&lt;p>評估遷移時、發現 New Relic → Datadog 不是「換個 agent 就好」 — APM schema、NRQL 查詢語言、custom dashboard、synthetic monitoring rule 全部要 &lt;em>重新對位&lt;/em>；application code 端的 agent 也要 &lt;em>完全換 binary&lt;/em>。是 Type A 高 schema 差 migration、不是 drop-in。&lt;/p>
&lt;h2 id="為什麼遷cost--k8s-native--vendor-consolidation-三條-driver">為什麼遷：cost / k8s-native / vendor consolidation 三條 driver&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Driver&lt;/th>
 &lt;th>觸發場景&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Cost&lt;/strong>&lt;/td>
 &lt;td>New Relic per-host pricing + custom event + synthetic 加總爆、Datadog 在 K8s 場景單 host 多 container 更划算&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>K8s-native&lt;/strong>&lt;/td>
 &lt;td>Datadog agent 對 K8s sidecar / DaemonSet / autodiscovery 更深&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Vendor consolidation&lt;/strong>&lt;/td>
 &lt;td>已用 Datadog log / metric、APM 統一 vendor 降工具切換 cost&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>反向 driver（Datadog → New Relic）：&lt;/p>
&lt;ul>
&lt;li>New Relic 對 &lt;em>full-stack observability&lt;/em>（APM + browser + mobile + synthetic）的整合包仍領先&lt;/li>
&lt;li>已深用 New Relic NRQL 跟 New Relic University 培訓的 organization、不切&lt;/li>
&lt;/ul>
&lt;h2 id="schema-對位">Schema 對位&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>New Relic concept&lt;/th>
 &lt;th>Datadog 對應&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>APM agent (NR Java / Python / Node)&lt;/td>
 &lt;td>Datadog agent + APM tracer library&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>NRQL query&lt;/td>
 &lt;td>Datadog query (Metric / Log / Trace)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Synthetic monitor&lt;/td>
 &lt;td>Datadog Synthetic Tests&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Custom event&lt;/td>
 &lt;td>Datadog custom metric / log event&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>NRQL alert condition&lt;/td>
 &lt;td>Datadog monitor&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>New Relic dashboard&lt;/td>
 &lt;td>Datadog dashboard (need rebuild)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Apdex score&lt;/td>
 &lt;td>Datadog APM &lt;code>apm.service.errors&lt;/code> + &lt;code>apm.service.latency&lt;/code>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Distributed trace&lt;/td>
 &lt;td>Datadog APM trace（OpenTelemetry-compatible）&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="phase-0audit--classify">Phase 0：Audit + classify&lt;/h2>
&lt;ul>
&lt;li>列所有 application 跟對應 NR agent version&lt;/li>
&lt;li>列所有 NRQL alert / dashboard / synthetic monitor&lt;/li>
&lt;li>估每月 cost 跟 Datadog 對比&lt;/li>
&lt;/ul>
&lt;h2 id="phase-1schema-對位--datadog-cluster-建置">Phase 1：Schema 對位 + Datadog cluster 建置&lt;/h2>
&lt;ul>
&lt;li>Datadog organization 申請 / IAM integration&lt;/li>
&lt;li>VPC peering / private link (如果用 self-hosted agent)&lt;/li>
&lt;/ul>
&lt;h2 id="phase-2translation-pipeline-3-tier">Phase 2：Translation pipeline (3-tier)&lt;/h2>
&lt;ul>
&lt;li>Tier 1: Datadog 端 import tool（API-based NRQL → Datadog query 轉換、cover ~40-60%）&lt;/li>
&lt;li>Tier 2: LLM-assisted（剩餘 query / dashboard）&lt;/li>
&lt;li>Tier 3: manual (synthetic / complex correlation)&lt;/li>
&lt;/ul>
&lt;h2 id="phase-3parallel-run-dual-agent-4-8-週">Phase 3：Parallel run (dual-agent 4-8 週)&lt;/h2>
&lt;p>兩個 agent 跑同 application、metric / trace / log 雙端輸出、SOC 比對 detection coverage / alert / dashboard 一致性。&lt;/p></description><content:encoded><![CDATA[<blockquote>
<p>本文是跨 vendor migration playbook、cross-link <a href="https://newrelic.com/">New Relic</a> 跟 <a href="/blog/backend/04-observability/vendors/datadog/" data-link-title="Datadog" data-link-desc="All-in-one SaaS 觀測平台、APM / Logs / Metrics / RUM / Security">Datadog</a>。跑 <a href="/blog/posts/migration-playbook-%E6%96%B9%E6%B3%95%E8%AB%96%E7%9A%84%E6%BC%94%E5%8C%96%E7%B4%80%E9%8C%84stage-0-variant-%E8%A6%8F%E5%8A%83%E6%8A%8A-collapse-%E7%8E%87%E5%BE%9E-60-%E9%99%8D%E5%88%B0-0/" data-link-title="Migration Playbook 方法論的演化紀錄：Stage 0 variant 規劃把 collapse 率從 60% 降到 0%" data-link-desc="跨 vendor migration playbook 需要獨立寫作方法論的依據，以及這套方法論從三輪 batch dogfood 中演化出來的驗證證據。">migration-playbook-methodology 6 維 audit</a> 後對映 <em>Schema = High（NRQL ↔ Datadog query、APM agent 不同）→ Type A phased translation</em>。</p></blockquote>
<h2 id="問題情境">問題情境</h2>
<p>中型 SaaS 跑 New Relic 3-5 年、production observability 飽和、團隊發現幾個問題：cost 暴漲（per-host APM + custom event + synthetic）、APM trace 對 Kubernetes-native workload 不夠細、跟 PagerDuty / Slack integration 雖然有但 latency 偏高。同期 Datadog 在 K8s monitoring + APM 端深度整合、cost model 在 100-500 host 規模更可預測。</p>
<p>評估遷移時、發現 New Relic → Datadog 不是「換個 agent 就好」 — APM schema、NRQL 查詢語言、custom dashboard、synthetic monitoring rule 全部要 <em>重新對位</em>；application code 端的 agent 也要 <em>完全換 binary</em>。是 Type A 高 schema 差 migration、不是 drop-in。</p>
<h2 id="為什麼遷cost--k8s-native--vendor-consolidation-三條-driver">為什麼遷：cost / k8s-native / vendor consolidation 三條 driver</h2>
<table>
  <thead>
      <tr>
          <th>Driver</th>
          <th>觸發場景</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><strong>Cost</strong></td>
          <td>New Relic per-host pricing + custom event + synthetic 加總爆、Datadog 在 K8s 場景單 host 多 container 更划算</td>
      </tr>
      <tr>
          <td><strong>K8s-native</strong></td>
          <td>Datadog agent 對 K8s sidecar / DaemonSet / autodiscovery 更深</td>
      </tr>
      <tr>
          <td><strong>Vendor consolidation</strong></td>
          <td>已用 Datadog log / metric、APM 統一 vendor 降工具切換 cost</td>
      </tr>
  </tbody>
</table>
<p>反向 driver（Datadog → New Relic）：</p>
<ul>
<li>New Relic 對 <em>full-stack observability</em>（APM + browser + mobile + synthetic）的整合包仍領先</li>
<li>已深用 New Relic NRQL 跟 New Relic University 培訓的 organization、不切</li>
</ul>
<h2 id="schema-對位">Schema 對位</h2>
<table>
  <thead>
      <tr>
          <th>New Relic concept</th>
          <th>Datadog 對應</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>APM agent (NR Java / Python / Node)</td>
          <td>Datadog agent + APM tracer library</td>
      </tr>
      <tr>
          <td>NRQL query</td>
          <td>Datadog query (Metric / Log / Trace)</td>
      </tr>
      <tr>
          <td>Synthetic monitor</td>
          <td>Datadog Synthetic Tests</td>
      </tr>
      <tr>
          <td>Custom event</td>
          <td>Datadog custom metric / log event</td>
      </tr>
      <tr>
          <td>NRQL alert condition</td>
          <td>Datadog monitor</td>
      </tr>
      <tr>
          <td>New Relic dashboard</td>
          <td>Datadog dashboard (need rebuild)</td>
      </tr>
      <tr>
          <td>Apdex score</td>
          <td>Datadog APM <code>apm.service.errors</code> + <code>apm.service.latency</code></td>
      </tr>
      <tr>
          <td>Distributed trace</td>
          <td>Datadog APM trace（OpenTelemetry-compatible）</td>
      </tr>
  </tbody>
</table>
<h2 id="phase-0audit--classify">Phase 0：Audit + classify</h2>
<ul>
<li>列所有 application 跟對應 NR agent version</li>
<li>列所有 NRQL alert / dashboard / synthetic monitor</li>
<li>估每月 cost 跟 Datadog 對比</li>
</ul>
<h2 id="phase-1schema-對位--datadog-cluster-建置">Phase 1：Schema 對位 + Datadog cluster 建置</h2>
<ul>
<li>Datadog organization 申請 / IAM integration</li>
<li>VPC peering / private link (如果用 self-hosted agent)</li>
</ul>
<h2 id="phase-2translation-pipeline-3-tier">Phase 2：Translation pipeline (3-tier)</h2>
<ul>
<li>Tier 1: Datadog 端 import tool（API-based NRQL → Datadog query 轉換、cover ~40-60%）</li>
<li>Tier 2: LLM-assisted（剩餘 query / dashboard）</li>
<li>Tier 3: manual (synthetic / complex correlation)</li>
</ul>
<h2 id="phase-3parallel-run-dual-agent-4-8-週">Phase 3：Parallel run (dual-agent 4-8 週)</h2>
<p>兩個 agent 跑同 application、metric / trace / log 雙端輸出、SOC 比對 detection coverage / alert / dashboard 一致性。</p>
<h2 id="phase-4cutover--cleanup">Phase 4：Cutover + cleanup</h2>
<ul>
<li>Application 端切 agent</li>
<li>New Relic license downgrade / cancel</li>
<li>Decommission timeline 3-6 個月（保留歷史查詢能力）</li>
</ul>
<h2 id="production-故障演練">Production 故障演練</h2>
<h3 id="case-1nrql-不直接對位-datadog-query">Case 1：NRQL 不直接對位 Datadog query</h3>
<p><strong>徵兆</strong>：NRQL <code>SELECT count(*) FROM Transaction FACET name WHERE duration &gt; 5 SINCE 1 hour ago</code> 在 Datadog 端需要拆 metric query + filter + group by；翻譯後語意對等但 syntax 完全不同、SOC analyst 學習曲線陡。</p>
<p><strong>修法</strong>：</p>
<ol>
<li>翻譯腳本 + LLM-assisted、保留 NRQL 字面 + Datadog query 對照表（runbook）</li>
<li>SOC training，1-2 週 hands-on</li>
<li>部分 query 改 <em>Datadog dashboard widget</em>、不用直接 query</li>
</ol>
<h3 id="case-2synthetic-monitor-對位失敗">Case 2：Synthetic monitor 對位失敗</h3>
<p><strong>徵兆</strong>：NR Synthetic 跑 100+ ping / browser / API test、切 Datadog Synthetic 後發現 <em>step-based</em> monitor 對應的「Browser Test」配置複雜、setup 工作量 2-3 倍預估。</p>
<p><strong>修法</strong>：</p>
<ol>
<li>Pre-cutover 跑 sample synthetic、估真實 setup cost</li>
<li>優先遷 critical synthetic、其他評估退役</li>
<li>用 Datadog API + Terraform 自動化、避免 UI 手動建</li>
</ol>
<h3 id="case-3cost-模型反轉">Case 3：Cost 模型反轉</h3>
<p><strong>徵兆</strong>：cutover 後第一個月 Datadog 帳單比 NR 高 30%；breakdown 後發現 <em>log retention + custom metric series + log indexing</em> 三個項目超預估。</p>
<p><strong>修法</strong>：</p>
<ol>
<li>Pre-migration 估 Datadog cost 必須含 <em>log indexing pricing</em>（按 indexed event 計）、不是純 ingest</li>
<li>Application 端 log scrub PII + sample debug log、降 ingest GB</li>
<li>Custom metric cardinality control（tag combination 爆 series count）</li>
</ol>
<h3 id="case-4dashboard-自動轉失敗人工-rebuild-80">Case 4：Dashboard 自動轉失敗、人工 rebuild 80%</h3>
<p><strong>徵兆</strong>：用 Datadog import tool 跑 NR dashboard、80% widget 缺 / 對應錯；team 估 2 週 dashboard rebuild、實際跑 6-8 週。</p>
<p><strong>修法</strong>：</p>
<ol>
<li><strong>接受重建</strong>：production dashboard 必須人工重建、不要期待自動轉</li>
<li><strong>Prioritize</strong>：先重建 SOC critical 30%、其他 deprecate</li>
<li><strong>Migration window 增 4-6 週</strong>：dashboard rebuild 是 underestimated effort</li>
</ol>
<h3 id="case-5cross-platform-metric-命名差">Case 5：Cross-platform metric 命名差</h3>
<p><strong>徵兆</strong>：NR 端 metric <code>Apdex/Apdex</code> 在 Datadog 沒對應、application code 寫死 metric name 失效；alert query 對 NR-specific metric 全失效。</p>
<p><strong>修法</strong>：</p>
<ol>
<li>Pre-cutover 列所有 NR-specific metric、application code 改用 OpenTelemetry-style metric 命名</li>
<li>Datadog query 端 rebuild、用 application-level metric name 而非 vendor-specific</li>
<li>長期：metric naming 用 OpenTelemetry semantic conventions、避免 vendor lock</li>
</ol>
<h2 id="capacity--cost">Capacity / cost</h2>
<table>
  <thead>
      <tr>
          <th>維度</th>
          <th>New Relic</th>
          <th>Datadog</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Pricing model</td>
          <td>per-host + custom event / synthetic</td>
          <td>per-host APM + log indexing + custom metric</td>
      </tr>
      <tr>
          <td>K8s-friendly</td>
          <td>中、autodiscovery 有但配置複雜</td>
          <td>高、K8s-native autodiscovery first-class</td>
      </tr>
      <tr>
          <td>Migration cost</td>
          <td>-</td>
          <td>2-4 FTE × 2-3 個月</td>
      </tr>
      <tr>
          <td>Operational FTE</td>
          <td>0.3-0.6</td>
          <td>0.3-0.6（相當）</td>
      </tr>
  </tbody>
</table>
<h2 id="整合--下一步">整合 / 下一步</h2>
<h3 id="跟-datadog--grafana-stack-migration-對位">跟 <a href="/blog/backend/04-observability/vendors/datadog/migrate-to-grafana-stack/" data-link-title="Datadog → Grafana Stack：把 $50K/month bill 拆解到 self-hosted observability" data-link-desc="Datadog 五層計費（host APM / metric / log ingest / log retention / RUM）拆解、對位 Grafana Stack（Mimir / Loki / Tempo / Grafana / Alloy）的 5 層責任；OTel-based agent migration、5 個 production 踩雷（cardinality 爆 / log volume cost / dashboard 不直接轉 / alert routing 換邏輯 / SLO definition 差異）、cost reality check">Datadog → Grafana Stack migration</a> 對位</h3>
<p>兩種 Datadog 端的後續路線：</p>
<ul>
<li>切到 Datadog 後 <em>繼續用</em>（穩定 multi-year）</li>
<li>切到 Datadog 後 <em>再切 Grafana Stack</em> 省 cost（multi-tool 拆分、Type D）</li>
</ul>
<p>多數 organization 第一輪 NR → Datadog 已花 2-3 個月、不會立刻再切；至少穩定 1-2 年。</p>
<h3 id="跟-opentelemetry-對齊">跟 OpenTelemetry 對齊</h3>
<p>Migration 順便升 OTel 化 application、避免下次 vendor 切換重複工作量。</p>
<h2 id="相關連結">相關連結</h2>
<ul>
<li>Target vendor：<a href="/blog/backend/04-observability/vendors/datadog/" data-link-title="Datadog" data-link-desc="All-in-one SaaS 觀測平台、APM / Logs / Metrics / RUM / Security">Datadog</a></li>
<li>平行 migration playbook (Type A)：<a href="/blog/backend/07-security-data-protection/vendors/splunk/migrate-to-elastic-security/" data-link-title="Splunk → Elastic Security Detection Rule Migration：6 段 phased playbook 跟 5 大踩雷" data-link-desc="從 Splunk Enterprise Security 遷到 Elastic Security 的 detection rule translation playbook：SPL ↔ KQL/ES|QL schema 對位、AI-assisted translation pipeline、parallel run 比對、cutover routing、5 個 production 踩雷（macro 沒對應 / time zone 差異 / summary index 不對位 / alert dedup key 衝突 / 過早 decommission）、capacity / cost 對照">Splunk → Elastic Security</a> / <a href="/blog/backend/01-database/vendors/mysql/migrate-to-postgresql/" data-link-title="MySQL → PostgreSQL：從 SQL dialect diff 跑出來的 Type A 6-phase migration" data-link-desc="MySQL → PostgreSQL 是 Type A 高 schema 差 migration 的標準形態 — SQL dialect / collation / case sensitivity / replication 模型差異主導；用 pgloader / AWS DMS / 自管 dual-write 三條 path、5 個 production 踩雷（auto_increment vs SERIAL / charset 跟 collation / case sensitivity / index syntax / triggers）">MySQL → PostgreSQL</a></li>
<li>平行 migration playbook (D-type 對位)：<a href="/blog/backend/04-observability/vendors/datadog/migrate-to-grafana-stack/" data-link-title="Datadog → Grafana Stack：把 $50K/month bill 拆解到 self-hosted observability" data-link-desc="Datadog 五層計費（host APM / metric / log ingest / log retention / RUM）拆解、對位 Grafana Stack（Mimir / Loki / Tempo / Grafana / Alloy）的 5 層責任；OTel-based agent migration、5 個 production 踩雷（cardinality 爆 / log volume cost / dashboard 不直接轉 / alert routing 換邏輯 / SLO definition 差異）、cost reality check">Datadog → Grafana Stack</a></li>
<li>Methodology：<a href="/blog/posts/migration-playbook-%E6%96%B9%E6%B3%95%E8%AB%96%E7%9A%84%E6%BC%94%E5%8C%96%E7%B4%80%E9%8C%84stage-0-variant-%E8%A6%8F%E5%8A%83%E6%8A%8A-collapse-%E7%8E%87%E5%BE%9E-60-%E9%99%8D%E5%88%B0-0/" data-link-title="Migration Playbook 方法論的演化紀錄：Stage 0 variant 規劃把 collapse 率從 60% 降到 0%" data-link-desc="跨 vendor migration playbook 需要獨立寫作方法論的依據，以及這套方法論從三輪 batch dogfood 中演化出來的驗證證據。">Migration playbook methodology</a></li>
</ul>
]]></content:encoded></item></channel></rss>