Skip to content
Platform

管理日志查询使用情况

你被收费的项目 #

🌐 What you are charged for

日志查询的使用不会直接收费。相反,你的组织会获得一个日志查询额度,这个额度会根据你摄取的日志数据量而增加。这个额度涵盖了你通过 Studio 界面、管理 API、命令行或其他任何接口读取日志时扫描的日志数据量。

🌐 Logs Query usage isn't billed directly. Instead, your organization gets a log query allowance that scales with how much log data you ingest. The allowance covers the volume of log data scanned when you read logs through the Studio UI, the Management API, the CLI, or any other interface.

你的零花钱是如何计算的 #

🌐 How your allowance is calculated

每个组织都会根据其日志摄取使用量获得一个查询额度,按照固定比例计算:

🌐 Every organization gets a query allowance scaled to its log ingest usage, at a fixed ratio:

Query allowance = 100 × log ingest usage

免费计划包含 1 GB 的数据摄取,所以它也包括 100 GB 的查询额度。付费计划包含 20 GB 的数据摄取,所以它们的查询额度从 2,000 GB 开始。如果你摄取的数据超过计划包含的数量并支付额外费用,你的额度会以相同的 100 倍速增长。

🌐 The Free Plan includes 1 GB of ingest, so it also includes 100 GB of query allowance. Paid plans include 20 GB of ingest, so they start with 2,000 GB of query allowance. If you ingest more than your plan's included amount and pay for the overage, your allowance grows at the same 100x rate.

每月摄取量超额摄取量(收费)查询额度
20 GB0 GB2,000 GB
21 GB1 GB2,100 GB
25 GB5 GB2,500 GB
40 GB20 GB4,000 GB
100 GB80 GB10,000 GB

日志查询没有单独的每 GB 价格。你的配额总是相当于同一个月你摄取量的 100 倍。

🌐 There's no separate per-GB price for Logs Query. Your allowance is always 100 times your ingest usage for the same month.

在你的发票上的用途 #

🌐 Usage on your invoice

日志查询不会出现在你的发票上,因为它不是单独收费的。

🌐 Logs Query doesn't appear as a line item on your invoice, because it isn't billed directly.

查看使用情况 #

🌐 View usage

你可以在仪表板的组织使用情况页面查看日志查询的使用情况。该页面默认显示所有项目的使用情况。要查看特定项目的使用情况,请从下拉菜单中选择它。你也可以选择不同的时间段。

🌐 You can view Logs Query usage on the organization's usage page of the Dashboard. The page shows the usage of all projects by default. To view the usage for a specific project, select it from the dropdown. You can also select a different time period.

优化使用 #

🌐 Optimize usage

两个人问听起来相似的问题,使用量可能差别很大,这取决于他们怎么问。这些小贴士可以帮你避免比问题所需的更多扫描数据——它们是习惯,而不是限制,而且没有一个要求你放弃所需的可见性。

🌐 Two people asking similar-sounding questions can generate very different amounts of usage, depending on how they ask. These tips help you avoid scanning more data than a question requires — they're habits, not restrictions, and none of them ask you to give up visibility you need.

  • 将你的时间范围缩小到问题所需。 查询成本随着查询扫描的数据量增加而增加,而时间范围通常是最大因素:一个 1 天的时间窗口扫描的数据约是 7 天时间窗口的 1/7。先从可能包含答案的最小窗口开始,如果找不到再扩大范围。如果你是有意进行真正的历史或趋势分析,就保持较宽的窗口——那是真正的使用场景,只是本质上成本更高而已。
  • 在查询时就进行过滤,而不是在提取数据后再过滤。 在运行搜索之前,为来源、服务、状态码或项目添加过滤条件。广泛的、未过滤的查询会扫描其时间范围内的所有内容,即使你之后只查看部分结果。事后过滤并不能减少已经扫描的数据量。
  • 使用 日志浏览器 进行临时查询,而不是脚本轮询。 每次查询都会重新扫描数据——重复提问没有缓存好处。按计划轮询查询端点的脚本每次运行都会重新扫描,所以它可能比手动检查的人消耗更多额度,即使通常没有发现新内容。
  • 对于任何持续性的情况,使用 日志转储。 如果你需要持续获取日志——无论是用于自己的监控系统、警报还是归档——不断查询自上次检查以来的新内容是最费资源的方式之一,因为每次检查都会重新扫描。而日志转储会在日志到达时直接将其传输到目标位置。

在你改变查询方式后,查看接下来几天的使用趋势,而不是只看某一天。使用量会根据你调试或调查的多少而变化,所以单一天的变化本身并不是一个可靠的信号。

🌐 After you change how you query, check your usage trend over the following few days rather than a single day. Usage varies with how much debugging or investigation you happen to do, so a single day's change isn't a reliable signal on its own.

当你超出你的限额时 #

🌐 When you exceed your allowance

如果你在某个月扫描的日志数据超过了你的额度,下个月就会进入降级状态:

🌐 If you scan more log data than your allowance covers in a given month, the following month enters a degraded state:

  • 查询每分钟限制10次。
  • 日志保留时间缩短到 24 小时(专业版、团队版和企业版)或 1 小时(免费版)。

如果下个月你在仍处于这种降级状态时再次超过使用额度,API 和 Studio UI 的日志访问将会在下一个月完全被切断。访问权限会在下一个计费周期恢复正常。

🌐 If you exceed your allowance again the next month, while still in that degraded state, logs access in the API and Studio UI will be cut off entirely for the month after. Access returns to normal at your next billing cycle.

具体演示 #

🌐 A concrete walkthrough

  • 一月:你使用了 20 GB 的摄取和 2,450 GB 的查询,超出了你的配额。
  • 二月:性能下降——每分钟10次查询,付费等级的保存时间缩短到24小时,免费计划为1小时。
  • 三月:如果二月也超标了,那就是连续两个月,所以这个月就是完全截止了。
  • 四月:计费周期重置,访问权限恢复正常。这让你可以继续努力优化日志查询的使用。