您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

在 Application Insights 中管理定价和数据量Manage pricing and data volume in Application Insights

Azure Application Insights 的定价以每个应用程序的数据量为基础。Pricing for Azure Application Insights is based on data volume per application. 每个 Application Insights 资源作为独立服务计费,并在 Azure 订阅的账单中产生相应费用。Each Application Insights resource is charged as a separate service, and contributes to the bill for your subscription to Azure.

目前有两种定价计划。There are two pricing plans. 默认的计划称为“基本”,其中包括与企业计划相同的所有功能,对于引入的数据量基本没有额外的成本和费用。The default plan is called Basic which includes all of the same features as the Enterprise plan at no addition cost and bills primarily on the volume of data ingested. 如果使用 Operations Management Suite,则应当选择企业计划,它具有每节点费用和每日数据额度,将对超出了所包括额度的引入数据收取费用。If you are using the Operations Management Suite, you should opt for the Enterprise plan, which has a per-node charge along with daily data allowances, and then will charge for data ingested above the included allowance.

如果对 Application Insights 的定价方式存在疑问,欢迎在我们的论坛提出问题。If you have questions about how pricing works for Application Insights, feel free to post a question in our forum.

价格计划The price plans

有关在你所在区域中以适合你的货币计价的当前价格,请参阅 Application Insights 定价页See the Application Insights pricing page for current prices in your currency and region.

基本计划Basic plan

创建新的 Application Insights 资源时,基本计划是默认的计划,也是满足大多数客户要求的最佳计划,使用 Operations Management Suite 订阅的客户除外。The Basic plan is the default when a new Application Insights resource is created, and is optimal for all customers except those with an Operations Management Suite subscription.

  • 在基本计划中,将按数据量(Application Insights 收到的遥测数据的字节数)对用户收费。In the Basic plan, you are charged by data volume: number of bytes of telemetry received by Application Insights. 数据量的衡量标准是 Application Insights 从用户应用程序收到的未压缩 JSON 数据包的大小。Data volume is measured as the size of the uncompressed JSON data package received by Application Insights from your application. 对于导入到 Analytics 中的表格数据,按发送到 Application Insights 的文件的未压缩大小来度量数据量。For tabular data imported into Analytics, the data volume is measured as the uncompressed size of files sent to Application Insights.
  • 定价未考虑实时指标流数据。Live Metrics Stream data isn't counted for pricing purposes.
  • 连续导出Log Analytics 连接器已推出,在 2018 年 4 月之前的基本计划中不额外收费。Continuous Export and the Log Analytics connector are available without any extra charge in the Basic plan as of April 2018.

企业计划和 Operations Management Suite 订阅权利Enterprise plan and Operations Management Suite subscription entitlements

按照最近的公告,购买 Microsoft Operations Management Suite E1 和 E2 的客户能够以附加组件的形式获取 Application Insights 企业版,而没有额外费用。Customers who purchase Microsoft Operations Management Suite E1 and E2 are able to get Application Insights Enterprise as an additional component at no additional cost as previously announced. 具体而言,Operations Management Suite E1 和 E2 的每个单位都包含对 Application Insights 企业计划的 1 个节点的权利。Specifically, each unit of Operations Management Suite E1 and E2 includes an entitlement to 1 node of the Enterprise plan of Application Insights. 每个 Application Insights 节点包含每天最多 200 MB 的引入数据(独立于 Log Analytics 数据引入),并且数据会保留 90 天,无额外费用,请参阅下面的详述。As described below in more detail each Application Insights node includes up to 200 MB of data ingested per day (separate from Log Analytics data ingestion), with 90-day data retention at no additional cost. 由于此服务仅适用于使用 Operations Management Suite 订阅的客户,没有订阅的客户将看不到用于选择此计划的选项。Since this is only applicable to customers with an Operations Management Suite subscription, customers without a subscription will not see an option to select this plan.


若要确保获取此权利,必须在企业定价计划中具有 Application Insights 资源。To ensure that you get this entitlement, you must have your Application Insights resources in the Enterprise pricing plan. 此权利仅作为节点进行应用,因此基本计划中的 Application Insights 资源不会实现任何优势。This entitlement applies only as nodes, so Application Insights resources in the Basic plan will not realize any benefit. 请注意,此权利不会出现在“使用情况和预估成本”页上显示的预估成本中。Note that this entitlement will not be visible on the estimated costs shown on the Usage and estimated cost page. 此外,如果将订阅移到 2018 年 4 月新发布的 Azure 监视定价模型中,则基本计划是唯一可用的计划,因此,如果你使用 Operations Management Suite 订阅,则我们不建议此选项。Also, if you move a subscription to the new Azure monitoring pricing model of April 2018, the Basic plan will be the only plan available so it is not advised if you have an Operations Management Suite subscription.

有关企业计划的详细信息,请访问企业定价详细信息页。For more details on the Enterprise plan visit the Enterprise pricing details page.

多步骤 Web 测试Multi-step web tests

多步骤 Web 测试会额外收费。There's an additional charge for multi-step web tests. 此类测试是指执行一系列操作的 Web 测试。This refers to web tests that perform a sequence of actions.

单页“ping 测试”不单独计费。There is no separate charge for 'ping tests' of a single page. 进行 ping 测试和多步测试时发送的遥测数据将与应用发送的其他遥测数据一起计费。Telemetry from both ping tests and multi-step tests is charged along with other telemetry from your app.

检查定价计划和估计成本Review pricing plans and estimate costs

通过 Application Insights 可以轻松了解可用的定价计划以及基于最近使用模式的可能成本。Application Insights makes it easy to understand the pricing plans available and what the costs are likely be based on recent usage patterns. 首先在 Azure 门户的 Application Insights 资源中打开“使用情况和预估成本”页:Start by opening the Usage and estimated costs page in the Application Insights resource in the Azure portal:


a.a. 查看当月数据量。Review your data volume for the month. 这包括接收和保留的所有数据(在通过服务器和客户端应用以及可用性测试进行采样后)。This includes all the data received and retained (after any sampling from your server and client apps, and from availability tests.

b.b. 会单独对多步骤 Web 测试计费。A separate charge is made for multi-step web tests. (这不包括简单可用性测试,它已包括在数据量费用中。)(This doesn't include simple availability tests, which are included in the data volume charge.)

c.c. 查看上个月的数据量趋势。View data volume trends for the last month.

d.d. 启用数据引入采样Enable data ingestion sampling.

e.e. 配置每日数据量上限。Configure the daily data volume cap.

Application Insights 费用将添加到 Azure 帐单。Application Insights charges are added to your Azure bill. 可以在 Azure 门户的“计费”部分或在 Azure Billing Portal(Azure 计费门户)查看 Azure 账单的详细信息。You can see details of your Azure bill on the Billing section of the Azure portal or in the Azure Billing Portal.


数据速率Data rate

发送数据时存在三种数量限值:There are three ways in which the volume you send data is limited:

  • 采样:可以使用此机制减少从服务器和客户端应用发送的遥测量,同时最大程度减小指标失真。Sampling: This mechanism can be used reduce the amount of telemetry sent from your server and client apps, with minimal distortion of metrics. 这是你拥有的调整数据量的主要工具。This is the primary tool you have to tune the amount of data. 了解有关采样功能的详细信息。Learn more about sampling features.
  • 每日上限:从 Azure 门户创建 Application Insights 资源时,此项设置为 100 GB/天。Daily cap: When creating an Application Insights resource from the Azure portal this is set to 100 GB/day. 从 Visual Studio 创建 Application Insights 资源时,默认值很小(只有 32.3 MB/天),仅为了便于测试。The default when creating an Application Insights resource from Visual Studio, is small (only 32.3 MB/day) which is intended only to facilitate testing. 在这种情况下,可预期用户在将应用部署到生产环境之前,会提高每日上限。In this case it is intended that the user will raise the daily cap before deploying the app into production. 除非为高流量应用程序请求了更高的最大值,否则最大上限是 1000 GB/天。The maximum cap is 1000 GB/day unless you have requested a higher maximum for a high traffic application. 设置每日上限时要格外小心,因为意图应是永远不达到每日上限,因为达到了会在当天的剩余时间内丢失数据,并且无法监视应用程序。Use care when setting the daily cap, as your intent should be never to hit the daily cap, because you will then lose data for the remainder of the day and be unable to monitor your application. 若要更改它,请使用从“使用情况和预估成本”页链接的“每日数据量上限”选项(参阅下文)。To change it, use the Daily volume cap option, linked from the Usage and estimated costs page (see below). 对于具有无法用于 Application Insights 的信用额度的某些订阅类型,我们已去除此限制。We've removed the restriction on some subscription types that have credit which could not be used for Application Insights. 以前,如果订阅有支出限制,“每日上限”对话框将提供如何去除此限制,并使每日上限提高到超过 32.3 MB/天的说明。Previously, if the subscription has a spending limit, the daily cap dialog will have instructions how to remove it and enable the daily cap to be raised beyond 32.3 MB/day.
  • 限制:此项将数据速率限制为每秒 32,000 个事件,取 1 分钟的平均值。Throttling: This limits the data rate to 32,000 events per second, averaged over 1 minute.

如果应用超过限制速率,会发生什么情况?What happens if my app exceeds the throttling rate?

  • 每分钟会评估一次应用发送的数据量。The volume of data that your app sends is assessed every minute. 如果超出一分钟内的平均每秒速率,服务器将拒绝某些请求。If it exceeds the per-second rate averaged over the minute, the server refuses some requests. SDK 会缓冲数据,并尝试重新发送,导致数分钟内数据传输量激增。The SDK buffers the data and then tries to resend, spreading a surge out over several minutes. 如果应用连续以超出限制的速率发送数据,一些数据会被丢弃。If your app consistently sends data at above the throttling rate, some data will be dropped. (ASP.NET、Java 和 JavaScript Sdk 会尝试以这种方式重新发送;其他 SDK 可能会丢弃超出限制的数据。)如果发生超出限制的情况,会显示一个通知,警告发生了这种情况。(The ASP.NET, Java, and JavaScript SDKs try to resend in this way; other SDKs might simply drop throttled data.) If throttling occurs, you'll see a notification warning that this has happened.

如何知道我的应用正在发送的数据量?How do I know how much data my app is sending?

  • 打开“使用情况和预估成本”页查看每日数据量图表。Open the Usage and estimated cost page to see the daily data volume chart.
  • 或在“指标资源管理器”中,添加新图表并选择“数据点量”作为其指标。Or in Metrics Explorer, add a new chart and select Data point volume as its metric. 启用“分组”,并按数据类型分组。Switch on Grouping, and group by Data type.

降低数据速率To reduce your data rate

可通过以下操作降低数据量:Here are some things you can do to reduce your data volume:

  • 使用采样Use Sampling. 此技术可减少数据速率,同时不会影响指标的准确性,也不会中断在“搜索”中的相关项目之间导航的能力。This technology reduces data rate without skewing your metrics, and without disrupting the ability to navigate between related items in Search. 在服务器应用中,它会自动运行。In server apps, it operates automatically.
  • 限制可在每个页面视图中报告的 Ajax 调用数或关闭 Ajax 报告。Limit the number of Ajax calls that can be reported in every page view, or switch off Ajax reporting.
  • 通过编辑 ApplicationInsights.config 关闭不需要的集合模块。例如,用户可能认为不再需要性能计数器或依赖项数据。Switch off collection modules you don't need by editing ApplicationInsights.config. For example, you might decide that performance counters or dependency data are inessential.
  • 将遥测拆分到单独的检测密钥。Split your telemetry to separate instrumentation keys.
  • 预先聚合指标。Pre-aggregate metrics. 如果已将对 TrackMetric 的调用放在应用中,则可通过使用重载降低流量,这种重载接受对一批度量值的平均偏差和标准偏差的计算结果。If you have put calls to TrackMetric in your app, you can reduce traffic by using the overload that accepts your calculation of the average and standard deviation of a batch of measurements. 也可使用 预先聚合包Or you can use a pre-aggregating package.

管理每日最大数据量Managing the maximum daily data volume

可使用每日数据上限来限制收集的数据量,但如果达到上限,会导致当天剩余时间内从应用程序发送的所有遥测丢失。You can use the daily volume cap to limit the data collected, but if the cap is met, it will result in a loss of all telemetry sent from your application for the remainder of the day. 不推荐让应用程序达到每日上限,因为达到每日上限后将无法跟踪应用程序运行状况和性能。It is not advisable to have your application to hit the daily cap since you are unable to track the health and performance of your application after it is hit.

相反,请使用采样将数据量调整到所需级别,将每日上限仅用作防止应用程序意外发送过多遥测数据量的“最后手段”。Instead, use Sampling to tune the data volume to the level you'd like, and use the daily cap only as a "last resort" in case your application starts sending much higher volumes of telemetry unexpectedly.

若要更改每日上限,请在“使用情况和预估成本”页中 Application Insights 资源的“配置”部分,单击“每日上限”。To change the daily cap, in the Configure section of your Application Insights resource, from the Usage and estimated costs page, click Daily Cap.



采样是一种方法,可降低向应用发送遥测的速率,同时仍可在诊断搜索过程中查找相关事件,并保留正确的事件计数。Sampling is a method of reducing the rate at which telemetry is sent to your app, while still retaining the ability to find related events during diagnostic searches, and still retaining correct event counts.

采样是降低费用同时又不超出每月配额的有效方式。Sampling is an effective way to reduce charges and stay within your monthly quota. 采样算法会保留遥测的相关项,这样,当使用“搜索”时便可查找与特定异常相关的请求。The sampling algorithm retains related items of telemetry, so that, for example, when you use Search, you can find the request related to a particular exception. 该算法还保留正确计数,使用户可在指标资源管理器中看到请求率、异常率和其他计数的正确值。The algorithm also retains correct counts, so that you see the correct values in Metric Explorer for request rates, exception rates, and other counts.

有数种形式的采样。There are several forms of sampling.

  • 自适应采样是用于 ASP.NET SDK 时的默认设置,它可自动调整为应用发送的遥测量。Adaptive sampling is the default for the ASP.NET SDK, which automatically adjusts to the volume of telemetry that your app sends. 它会在 Web 应用的 SDK 中自动运行,以便减少网络上的遥测流量。It operates automatically in the SDK in your web app, so that the telemetry traffic on the network is reduced.
  • 引入采样是一种替代方法,会在应用的遥测进入 Application Insights 服务时运行。Ingestion sampling is an alternative that operates at the point where telemetry from your app enters the Application Insights service. 这种形式的采样不会影响从应用发送的遥测量,但会减少服务保留的量。It doesn't affect the volume of telemetry sent from your app, but it reduces the volume retained by the service. 可以使用这种采样来降低来自浏览器和其他 SDK 的遥测所使用的配额。You can use it to reduce the quota used up by telemetry from browsers and other SDKs.

若要设置引入采样,请在“定价”对话框中设置控制措施:To set ingestion sampling, set the control in the Pricing dialog:



“数据采样”对话框仅控制引入采样的值。The Data sampling dialog only controls the value of ingestion sampling. 它不反映 Application Insights SDK 在应用中应用的采样速率。It doesn't reflect the sampling rate that is being applied by the Application Insights SDK in your app. 如果传入的遥测已在 SDK 处进行了采样,则不适用引入采样。If the incoming telemetry has already been sampled at the SDK, ingestion sampling is not applied.

若要查找实际采样率(无论是否已应用),请使用如下所示的分析查询To discover the actual sampling rate no matter where it has been applied, use an Analytics query such as this:

requests | where timestamp > ago(1d)
| summarize 100/avg(itemCount) by bin(timestamp, 1h)
| render areachart

在每个保留的记录中,itemCount 指示它表示的原始记录数,其等于 1 +(即以前已放弃的记录数)。In each retained record, itemCount indicates the number of original records that it represents, equal to 1 + the number of previous discarded records.


可使用 Azure 资源管理编写脚本进行价格计划设置。You can write a script to set the price plan, using Azure Resource Management. 了解操作方法Learn how.

限制摘要Limits summary

每个应用程序(即每个检测密钥)的度量值和的事件数都具有一定限制。There are some limits on the number of metrics and events per application (that is, per instrumentation key). 限制取决于选择的定价计划Limits depend on the pricing plan that you choose.

资源Resource 默认限制Default limit 注意Note
每日的总数据量Total data per day 100 GB100 GB 可以通过设置一个上限来减少数据。You can reduce data by setting a cap. 如果需要更多,可以从门户最多将限制增加到 1,000 GB。If you need more, you can increase the limit up to 1,000 GB from the portal. 如需大于 1,000 GB 的容量,请将邮件发送到 AIDataCap@microsoft.com。For capacities greater than 1,000 GB, send mail to AIDataCap@microsoft.com.
每月免费数据量Free data per month
(基本价格计划)(Basic price plan)
1 GB1 GB 额外的数据按千兆字节收费。Additional data is charged per gigabyte.
限制Throttling 32000 个事件/秒32 k events/second 限制按分钟计量。The limit is measured over a minute.
数据保留Data retention 90 天90 days 此资源适用于搜索分析指标资源管理器This resource is for Search, Analytics, and Metrics Explorer.
可用性多步骤测试详细结果保留Availability multi-step test detailed results retention 90 天90 days 此资源提供了每个步骤的详细结果。This resource provides detailed results of each step.
最大事件大小Maximum event size 64 K64 K
属性和指标名称长度Property and metric name length 150150 请参阅类型架构See type schemas
属性值字符串长度Property value string length 8,1928,192 请参阅类型架构See type schemas
跟踪和异常消息长度Trace and exception message length 10 k10 k 请参阅类型架构See type schemas
每个应用的可用性测试计数Availability tests count per app 100100
探查器数据保留期Profiler data retention 5 天5 days
每天发送的探查器数据量Profiler data sent per day 10GB10GB

有关详细信息,请参阅关于 Application Insights 中的定价和配额For more information, see About pricing and quotas in Application Insights.

后续步骤Next steps