您现在访问的是微软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 Azure subscription.

Application Insights 提供两种定价计划:基本和企业计划。Application Insights has two pricing plans: Basic and Enterprise. 基本定价计划是默认计划。The Basic pricing plan is the default plan. 它包括所有企业计划功能,不另外收费。It includes all Enterprise plan features, at no additional cost. 基本计划帐单主要针对引入的数据量。The Basic plan bills primarily on the volume of data that's ingested.

企业计划按节点收费,每个节点会收到每日数据限额。The Enterprise plan has a per-node charge, and each node receives a daily data allowance. 在企业定价计划中,需要为引入数据中超出规定限额的数据支付费用。In the Enterprise pricing plan, you are charged for data ingested above the included allowance. 如果使用 Operations Management Suite,应选择企业计划。If you use Operations Management Suite, you should choose the Enterprise plan.

如果对 Application Insights 定价工作原理存在疑问,欢迎在我们的论坛提出问题。If you have questions about how pricing works for Application Insights, you can post a question in our forum.

定价计划Pricing plans

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

备注

在 2018 年 4 月,我们引入了 Azure 监视的新定价模型。In April 2018, we introduced a new pricing model for Azure monitoring. 此模型在监视服务的完整组合中采用简单的“即用即付”模型。This model adopts a simple "pay-as-you-go" model across the complete portfolio of monitoring services. 深入了解新的定价模型、如何根据使用模式评估移到此模型的影响以及如何选择加入该新模型Learn more about the new pricing model, how to assess the impact of moving to this model based on your usage patterns, and how to opt into the new model.

基本计划Basic plan

创建新的 Application Insights 资源时,基本计划是默认的定价计划。The Basic plan is the default pricing plan when a new Application Insights resource is created. 基本计划适用于除具有 Operations Management Suite 订阅外的所有客户。The Basic plan is optimal for all customers except those who have an Operations Management Suite subscription.

  • 在基本计划中,会按数据量收费。In the Basic plan, you are charged by data volume. 数据量是 Application Insights 收到的遥测数据的字节数。Data volume is the 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 that's received by Application Insights from your application. 对于导入到 Analytics 中的表格数据,数据量的衡量标准是发送到 Application Insights 的文件的未压缩大小。For tabular data imported to Analytics, data volume is measured as the uncompressed size of files that are sent to Application Insights.
  • 自 2018 年 4 月起,应用程序的数据量费用将在名为“数据引入”的新计费表中报告。Your application's data volume charges are now reported on a new billing meter named Data Ingestion as of April 2018. 这种新型仪表将通过诸如 Applications Insights 和 Log Analytics 等监视技术进行共享,目前位于服务名称“应用程序服务”(即将更改为 Log Analytics)下。This new meter is be shared across monitoring technologies such as Applications Insights and Log Analytics and is currently under the service name App Services (and soon changing to Log Analytics).
  • 定价未考虑实时指标流数据。Live Metrics Stream data isn't counted for pricing purposes.
  • 连续导出Azure Log Analytics 连接器已推出,在 2018 年 4 月之前的基本计划中不额外收费。Continuous export and the Azure Log Analytics connector are available at no 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 Enterprise,而没有额外费用。Customers who purchase Operations Management Suite E1 and E2 can get Application Insights Enterprise as an additional component at no additional cost as previously announced. 具体而言,Operations Management Suite E1 和 E2 的每个单位都包含对 Application Insights Enterprise 计划的 1 个节点的权利。Specifically, each unit of Operations Management Suite E1 and E2 includes an entitlement to one node of the Application Insights Enterprise plan. 每个 Application Insights 节点包含每天最多 200 MB 的引入数据(独立于 Log Analytics 数据引入),并且数据会保留 90 天,无额外费用。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. 本文后面会详述该计划。The plan is described in more detailed later in the article.

由于此计划仅适用于使用 Operations Management Suite 订阅的客户,没有 Operations Management Suite 订阅的客户不会看到用于选择此计划的选项。Because this plan is applicable only to customers with an Operations Management Suite subscription, customers who don't have an Operations Management Suite subscription don't see an option to select this plan.

备注

若要确保获取此权利,必须在企业定价计划中具有 Application Insights 资源。To ensure that you get this entitlement, your Application Insights resources must be in the Enterprise pricing plan. 此权利仅以节点的形式应用。This entitlement applies only as nodes. 基本计划中的 Application Insights 资源不会实现任何权益。Application Insights resources in the Basic plan don't realize any benefit. 此权利不会出现在“使用情况和预估成本”窗格中显示的预估成本中。This entitlement isn't visible in the estimated costs shown in the Usage and estimated cost pane. 此外,如果在 2018 年 4 月将订阅移到新的 Azure 监视定价模型,则只可使用基本计划。Also, if you move a subscription to the new Azure monitoring pricing model in April 2018, the Basic plan is the only plan available. 如果具有 Operations Management Suite 订阅,不建议将订阅移到新的 Azure 监视定价模型。Moving a subscription to the new Azure monitoring pricing model isn't advisable if you have an Operations Management Suite subscription.

有关企业计划的详细信息,请参阅企业定价详细信息For more information about the Enterprise plan, see Enterprise pricing details.

多步骤 Web 测试Multi-step web tests

多步骤 Web 测试会额外收费。Multi-step web tests incur an additional charge. 多步骤 Web 测试是指执行一系列操作的 Web 测试。Multi-step web tests are web tests that perform a sequence of actions.

单页“ping 测试”不单独计费。There's no separate charge for ping tests of a single page. 进行 ping 测试和多步测试时发送的遥测数据与应用发送的其他遥测数据计费方式相同。Telemetry from ping tests and multi-step tests is charged the same as other telemetry from your app.

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

通过 Application Insights 可以轻松了解可用的定价计划以及基于最近使用模式的可能成本。Application Insights makes it easy to understand the pricing plans that are available, and what your costs are likely to be based on recent usage patterns. 若要开始使用,在 Azure 门户的 Application Insights 资源中,转到“使用情况和预估成本”窗格:To get started, in the Azure portal, for the Application Insights resource, go to the Usage and estimated costs pane:

选择定价

A.A. 查看当月数据量。Review your data volume for the month. 这包括接收和保留的所有数据(在通过服务器和客户端应用以及可用性测试进行采样后)。This includes all the data that's 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 past month.
D.D. 启用数据引入采样Enable data ingestion sampling.
E.E. 设置每日数据量上限。Set the daily data volume cap.

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

在左侧菜单中,选择“账单”

数据速率Data rate

通过三种方式限制发送数据量:The volume of data you send is limited in three ways:

  • 采样: 可以使用采样减少从服务器和客户端应用发送的遥测量,同时最大程度减小指标失真。Sampling: You can use sampling to reduce the amount of telemetry that's sent from your server and client apps, with minimal distortion of metrics. 采样是你可用来调整发送数据量的主要工具。Sampling is the primary tool you can use to tune the amount of data you send. 了解有关采样功能的详细信息。Learn more about sampling features.
  • 每日上限: 在 Azure 门户中创建 Application Insights 资源时,每日上限设置为 100 GB/天。Daily cap: When you create an Application Insights resource in the Azure portal, the daily cap is set to 100 GB/day. 在 Visual Studio 中创建 Application Insights 资源时,默认值很小(只有 32.3 MB/天)。When you create an Application Insights resource in Visual Studio, the default is small (only 32.3 MB/day). 设置每日上限默认值,以便进行测试。The daily cap default is set to facilitate testing. 可预期用户在将应用部署到生产环境之前,会提高每日上限。It's intended that the user will raise the daily cap before deploying the app into production.

    除非为高流量应用程序请求了更高的最大值,否则最大上限是 1000 GB/天。The maximum cap is 1,000 GB/day unless you request a higher maximum for a high-traffic application.

    设置每日上限时,务必小心。Use care when you set the daily cap. 你的目标应该是“永远不会达到每日上限”。Your intent should be to never hit the daily cap. 如果达到每日上限,会丢失当天剩余时间的数据,无法监视应用程序。If you hit the daily cap, you lose data for the remainder of the day, and you can't monitor your application. 若要更改每日上限,请使用“每日容量上限”选项。To change the daily cap, use the Daily volume cap option. 可在“使用情况和预估成本”窗格中访问此选项(本文后面会详述)。You can access this option in the Usage and estimated costs pane (this is described in more detail later in the article). 对于具有无法用于 Application Insights 的额度的某些订阅类型,我们已去除此限制。We've removed the restriction on some subscription types that have credit that couldn't be used for Application Insights. 以前,如果订阅有支出限制,“每日上限”对话框将提供如何去除此限制,并使每日上限提高到超过 32.3 MB/天的说明。Previously, if the subscription has a spending limit, the daily cap dialog has instructions to remove the spending limit and enable the daily cap to be raised beyond 32.3 MB/day.

  • 限制:此项将数据速率限制为每秒 32,000 个事件,取每个检测密钥 1 分钟的平均值。Throttling: Throttling limits the data rate to 32,000 events per second, averaged over 1 minute per instrumentation key.

如果应用超过限制速率,会发生什么情况?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 it. 它会在几分钟内出现传播高峰。It spreads out a surge over several minutes. 如果应用连续以超出限制的速率发送数据,一些数据会被丢弃。If your app consistently sends data at more than the throttling rate, some data will be dropped. (ASP.NET、Java 和 JavaScript SDK 会尝试以这种方式重新发送;其他 SDK 可能会只是丢弃超出限制的数据。)如果发生超出限制的情况,会显示一个通知,警告发生了这种情况。(The ASP.NET, Java, and JavaScript SDKs try to resend data this way; other SDKs might simply drop throttled data.) If throttling occurs, a notification warning alerts you that this has occurred.

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

可使用下列选项之一查看正在发送的数据量:You can use one of the following options to see how much data your app is sending:

  • 转到“使用情况和预估成本”页查看每日数据量图表。Go to the Usage and estimated cost pane to see the daily data volume chart.
  • 在指标资源管理器中,添加新图表。In Metrics Explorer, add a new chart. 对于图表指标,选择“数据点容量”。For the chart metric, select Data point volume. 启用“分组”,并按数据类型分组。Turn on Grouping, and then group by Data type.

降低数据速率Reduce your data rate

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

  • 使用采样Use Sampling. 此项技术会降低数据速率,而无需倾斜指标。This technology reduces your data rate without skewing your metrics. 你仍然可以在“搜索”中的相关项之间导航。You don't lose the ability to navigate between related items in Search. 在服务器应用中,采样会自动运行。In server apps, sampling 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 关闭不需要的集合模块。Edit ApplicationInsights.config to turn off collection modules that you don't need. 例如,用户可能认为不再需要性能计数器或依赖项数据。For example, you might decide that performance counters or dependency data are inessential.
  • 在单独的检测密钥之间拆分遥测。Split your telemetry among separate instrumentation keys.
  • 预先聚合指标。Pre-aggregate metrics. 如果将对 TrackMetric 的调用放在应用中,则可通过使用重载降低流量,这种重载接受对一批度量值的平均偏差和标准偏差的计算结果。If you 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.

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

可以使用每日容量上限,限制所收集的数据。You can use the daily volume cap to limit the data collected. 但是,如果达到上限,会丢失当天剩余时间从应用程序发送的所有遥测数据。However, if the cap is met, a loss of all telemetry sent from your application for the remainder of the day occurs. 不建议使应用程序达到每日上限。It is not advisable to have your application hit the daily cap. 达到每日上限后,无法跟踪应用程序的运行状况和性能。You can't track the health and performance of your application after it reaches the daily cap.

不使用每日容量上限,而是使用采样,将数据量调整到所需级别。Instead of using the daily volume cap, use sampling to tune the data volume to the level you want. 然后,仅在应用程序意外开始发送远高于预期的遥测量时,才使用每日上限作为“最后的手段”。Then, use the daily cap only as a "last resort" in case your application unexpectedly begins to send much higher volumes of telemetry.

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

调整每日遥测数据量上限

采样Sampling

采样是一种方法,可降低向应用发送遥测的速率,同时仍可在诊断搜索过程中查找相关事件。Sampling is a method of reducing the rate at which telemetry is sent to your app, while retaining the ability to find related events during diagnostic searches. 此外,还可保留正确的事件计数。You also retain 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, for example, when you use Search, you can find the request related to a particular exception. 该算法还保留正确计数,使用户可在指标资源管理器中看到请求率、异常率和其他计数的正确值。The algorithm also retains correct counts so 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. 自适应采样可自动调整为应用发送的遥测量。Adaptive sampling 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 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. 引入采样不会影响从应用发送的遥测量,但会减少服务保留的量。Ingestion sampling doesn't affect the volume of telemetry sent from your app, but it reduces the volume that's retained by the service. 可以使用引入采样来降低来自浏览器和其他 SDK 的遥测所使用的配额。You can use ingestion sampling to reduce the quota that's used up by telemetry from browsers and other SDKs.

若要设置引入采样,请转到“定价”窗格:To set ingestion sampling, go to the Pricing pane:

选择“配额和定价”窗格中的“示例”磁贴,并选择采样分数

警告

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

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

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

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

自动化Automation

可使用 Azure 资源管理编写脚本进行价格计划设置。You can write a script to set the price plan by 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 data, you can increase the limit in the portal, up to 1,000 GB. 如需大于 1,000 GB 的容量,请将邮件发送到 AIDataCap@microsoft.com。For capacities greater than 1,000 GB, send mail to AIDataCap@microsoft.com.
限制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 10 GB10 GB

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

后续步骤Next steps