> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 为你的技术栈评估 30 款日志库

export const UseCaseHero = ({title, description, prompt, category, features, devinUrl, agent, intent, playbookId, type}) => {
  const encodedPrompt = encodeURIComponent(prompt || '');
  const tag = 'docs-use-case-gallery';
  const utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=hero-cta';
  const agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  const devinHref = type === 'schedule' ? 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + (prompt ? '&prompt=' + encodedPrompt : '') : type === 'review' ? 'https://app.devin.ai/review?' + utm : agent === 'ada' ? 'https://app.devin.ai/search?' + utm + '&noSubmit=true' + (prompt ? '&prompt=' + encodedPrompt : '') : devinUrl ? devinUrl.includes('?') ? devinUrl + '&' + utm + agentParams : devinUrl + '?' + utm + agentParams : prompt ? 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encodedPrompt : 'https://app.devin.ai/?' + utm + agentParams;
  const buttonLabel = type === 'schedule' ? 'Schedule in Devin ↗' : type === 'review' ? 'Set Up Devin Review ↗' : agent === 'advanced' ? 'Try in Devin ↗' : agent === 'dana' ? 'Try in Dana ↗' : agent === 'ada' ? 'Try in Ask Devin ↗' : 'Try in Devin ↗';
  const featureList = features ? features.split(',').map(f => f.trim()) : [];
  return <div className="uc-hero">
      <div className="uc-hero-inner">
        <div className="uc-hero-left">
          <h1 className="uc-hero-title">{title}</h1>
          <p className="uc-hero-desc">{description}</p>
          <div>
            <a href={devinHref} target="_blank" rel="noopener noreferrer" className="try-in-devin-btn">
              {buttonLabel}
            </a>
          </div>
        </div>
        <div className="uc-hero-meta">
          <div className="uc-meta-item">
            <span className="uc-meta-label">Author</span>
            <span className="uc-meta-value">Cognition</span>
          </div>
          <div className="uc-meta-item">
            <span className="uc-meta-label">Category</span>
            <span className="uc-meta-value">{category}</span>
          </div>
          {featureList.length > 0 && <div className="uc-meta-item">
              <span className="uc-meta-label">Features</span>
              <span className="uc-meta-value">{featureList.join(', ')}</span>
            </div>}
        </div>
      </div>
    </div>;
};

export const PromptBlock = ({children, type, agent, intent, playbookId}) => {
  var utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=prompt-block';
  var tag = 'docs-use-case-gallery';
  var agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  var label = type === 'schedule' ? 'Schedule in Devin' : type === 'playbook' ? 'Create Playbook' : type === 'knowledge' ? 'Add to Knowledge' : agent === 'advanced' ? 'Try in Devin' : agent === 'dana' ? 'Try in Dana' : agent === 'ada' ? 'Try in Ask Devin' : 'Try in Devin';
  var buildUrl = function (text) {
    var encoded = encodeURIComponent(text);
    if (type === 'schedule') return 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + '&prompt=' + encoded;
    if (type === 'playbook') return 'https://app.devin.ai/settings/playbooks/create?' + utm + '&body=' + encoded;
    if (type === 'knowledge') return 'https://app.devin.ai/knowledge?' + utm + '&body=' + encoded;
    if (agent === 'ada') return 'https://app.devin.ai/search?' + utm + '&noSubmit=true&prompt=' + encoded;
    return 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encoded;
  };
  const ref = React.useRef(null);
  const [href, setHref] = React.useState('#');
  React.useEffect(() => {
    if (!ref.current) return;
    var codeEl = ref.current.querySelector('pre code');
    if (codeEl) {
      var text = codeEl.textContent.trim();
      if (text) setHref(buildUrl(text));
    }
    var header = ref.current.querySelector('[data-component-part="code-block-header"]');
    if (header && !header.querySelector('.prompt-block-devin-link')) {
      var link = document.createElement('a');
      link.href = href;
      link.target = '_blank';
      link.rel = 'noopener noreferrer';
      link.className = 'prompt-block-devin-link';
      link.style.cssText = 'display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;background:#317CFF;transition:background 0.2s;margin-left:8px;';
      link.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg> ' + label;
      link.onmouseenter = function () {
        link.style.background = '#2968D9';
      };
      link.onmouseleave = function () {
        link.style.background = '#317CFF';
      };
      header.appendChild(link);
    }
    var existingLink = ref.current.querySelector('.prompt-block-devin-link');
    if (existingLink && href !== '#') existingLink.href = href;
  });
  return <div className="prompt-block" ref={ref}>{children}</div>;
};

<UseCaseHero title="为你的技术栈评估 30 个日志库" description="为每个库运行一个 Devin 会话，打分其价格、性能和 SDK 质量——然后将所有结果汇总成一个按评分排序的对比表。" prompt="我们要更换日志管道。启动一批 30 个并行 Devin 会话——每个日志库一个——以调研性能基准、定价档位、各语言 SDK 质量以及数据保留策略。将所有结论汇总到一个对比表格中，并按照对 Node.js + Python 微服务技术栈的整体契合度进行排序。" category="Devin 优化" features="高级" agent="advanced" intent="batch" />

<div className="uc-detail-wrapper">
  <Tip>不想手动设置？把此页面的链接粘贴到 Devin 会话中，然后让它为你完成所有设置。</Tip>

  <Steps>
    <Step title="使用统一模板编写研究提示词">
      有用的并行调研的关键，是让每个会话都使用同一份检查清单。每个会话独立调研一个库，因此通过统一模板，可以在合并结果时直接进行对比。

      从 [Devin home page](https://app.devin.ai/?utm_source=docs\&utm_medium=use-case-gallery) 打开一个新的 Devin 会话，或者使用 Devin home page 上的 **Explore Advanced Capabilities** 页面获取并行调研的提示词模板。

      <PromptBlock agent="advanced" intent="batch">
        ```txt 并行日志库评估 theme={null}
        我们准备为一个基于 Node.js + Python 的微服务架构（约 50 个服务，约 2 TB 日志/天）
        替换现有的 ELK 技术栈，采用现代化的日志解决方案。
        请并行调研以下日志库和平台——每个库使用一个会话：

        Datadog Logs, Grafana Loki, AWS CloudWatch Logs, Google Cloud Logging,
        Splunk, New Relic Logs, Axiom, Better Stack (Logtail), Mezmo (LogDNA),
        Logz.io, Papertrail, Sumo Logic, Elastic Cloud, Scalyr (Dataset),
        Timber.io, Seq, Graylog, Fluentd, Vector, Logstash, Syslog-ng,
        OpenTelemetry Collector, Cribl, Coralogix, Honeycomb, Baselime,
        Highlight.io, Signoz, Hyperdx, Last9

        针对每个库，填充以下模板：
        - 类型：SaaS 平台、自托管，或 agent/collector
        - 计费模型，以及在 2 TB/天写入量下的预计月度成本
        - 日志保留选项（热、温、冷分层）
        - Node.js SDK：质量评分 1–5，是否支持自动探针/自动埋点（是/否）
        - Python SDK：质量评分 1–5，是否支持自动探针/自动埋点（是/否）
        - 查询语言，以及 7 天时间窗口下的平均查询延迟
        - 告警：内置规则、异常检测（是/否）
        - 在开发者社区/论坛中提到的显著限制或常见吐槽

        输出为一份 markdown 报告，并用上述模板完整填写内容。
        ```
      </PromptBlock>
    </Step>

    <Step title="审核并批准拟议的会话">
      提交后，Devin 会解析你的列表，并为每个库建议一个会话。你会看到类似这样的预览：

      ```
      Proposed sessions (30):
        1. Research Datadog Logs — pricing, SDKs, retention, alerting...
        2. Research Grafana Loki — pricing, SDKs, retention, alerting...
        3. Research AWS CloudWatch Logs — pricing, SDKs, retention, alerting...
        ...
      ```

      查看列表并点击 **Approve**，即可同时启动所有会话。每个会话都会独立运行——浏览对应库的网站、阅读文档、查看开发者论坛并填写模板。

      如果你想跳过或添加库，可以在批准前编辑列表。你也可以关联一个 [playbook](/zh/product-guides/creating-playbooks)，以确保每个会话都遵循相同的研究方法。
    </Step>

    <Step title="收集和比较结果">
      在全部会话完成后，Devin 会自动将各个报告合并为一份综合对比结果。输出格式会严格符合您指定的要求——下面是汇总后的电子表格式对比示例：

      ```
      ## Logging Library Comparison (Node.js + Python, 2 TB/day)

      | Library           | Type       | $/mo (2 TB/day) | Retention       | Node SDK | Python SDK | Query Lang   | Alerting     |
      |-------------------|------------|-----------------|-----------------|----------|------------|--------------|--------------|
      | Datadog Logs      | SaaS       | ~$5,400         | 15d hot, archive| 5/5      | 5/5        | Custom DSL   | Yes + anomaly|
      | Grafana Loki      | Self-host  | Infra only      | Configurable    | 4/5      | 4/5        | LogQL        | Via Grafana  |
      | Axiom              | SaaS       | ~$1,200         | 30d hot, 1yr    | 4/5      | 4/5        | APL          | Yes          |
      | Better Stack      | SaaS       | ~$890           | 30d default     | 5/5      | 4/5        | SQL-like     | Yes          |
      | Elastic Cloud     | SaaS/self  | ~$3,600         | ILM policies    | 5/5      | 5/5        | KQL / Lucene | Yes + ML     |
      | Signoz            | Self-host  | Infra only      | Configurable    | 4/5      | 4/5        | ClickHouse SQL| Yes         |
      | Coralogix         | SaaS       | ~$2,100         | Hot/warm/cold   | 4/5      | 3/5        | Lucene / SQL | Yes + anomaly|
      | ...               |            |                 |                 |          |            |              |              |

      ### Top 3 for a 50-service Node.js + Python stack:
      1. Axiom — lowest cost at scale, fast APL queries, solid SDKs
      2. Grafana Loki — zero license cost, pairs with existing Grafana dashboards
      3. Datadog Logs — best SDK auto-instrumentation, but expensive at 2 TB/day
      ```

      你可以在同一个会话中继续提出后续问题——它保留了所有子会话的上下文。

      一旦你选定了最佳方案，就可以直接在同一个会话里启动一个 Devin 会话，在你的代码仓库中完成该库的设置：

      <PromptBlock>
        ```txt Set up Axiom logging in our monorepo theme={null}
        Set up Axiom as our logging solution across our Node.js Express and
        Python FastAPI services. Install the SDKs, configure structured
        logging with correlation IDs, add the AXIOM_API_TOKEN from env vars,
        and verify logs are flowing by hitting a test endpoint. Open a PR
        with the setup.
        ```
      </PromptBlock>
    </Step>

    <Step title="深入评估入围名单">
      一旦有了候选短名单，就开始有针对性的跟进会话，以进行更深入的评估。

      <PromptBlock agent="advanced" intent="batch">
        ```txt 深入评估排名前 3 的日志解决方案 theme={null}
        选取 Axiom、Grafana Loki 和 Datadog Logs 做更深入的评估：
        - 为每个方案基于我们的 Node.js Express 服务和 Python FastAPI 服务
          构建一个概念验证级别的集成
        - 导入 10,000 行示例日志并测量写入延迟
        - 运行 5 个贴近实际的查询（错误率、P99 延迟、链路追踪关联、
          全文搜索、正则过滤），并记录响应时间
        - 记录搭建过程中的摩擦点（账号创建、SDK 安装、首条日志可见）
        汇总报告哪个方案的搭建最快、查询最稳定可靠。
        ```
      </PromptBlock>

      <PromptBlock agent="advanced" intent="batch">
        ```txt 将同样的模式应用到 APM 工具 theme={null}
        使用相同的并行调研模式来评估 15 个 APM / 链路追踪平台：
        Datadog APM、New Relic、Dynatrace、Honeycomb、Lightstep、
        Jaeger、Zipkin、Signoz、Grafana Tempo、AWS X-Ray、Google Cloud Trace、
        Elastic APM、Splunk APM、Highlight.io、Last9。使用同一模板：定价、
        SDK 质量、查询语言以及主要限制。
        ```
      </PromptBlock>
    </Step>

    <Step title="提示">
      ### 这种模式适用于任何技术评估

      并行调研不限于日志工具。只要是在评估多个选项、且需要收集相同数据点的场景，都可以使用这种方法——比如 CI/CD 平台、功能开关 (feature flag) 服务、ORM、云服务商，或合规框架。示例：“调研这 20 个 CI/CD 平台，并比较构建速度、价格、自托管选项，以及 GitHub 集成质量。”

      ### 将每个会话控制在 15–30 分钟内

      如果单个库需要几小时的深入调研，这就说明它应该作为一个单独、聚焦的会话来处理，而不是作为一次并行运行的一部分。并行会话最适合于每个条目所需工作量大致相同的情况。
    </Step>
  </Steps>
</div>
