使用 API 执行事件请求时出现 Application Insights 错误 "Rate limit is exceeded"

Application Insights error "Rate limit is exceeded" when executing event request using API

我正在尝试使用网页浏览事件调用 Application insights API,但我收到此错误消息

{
  "error": {
    "message": "Rate limit is exceeded",
    "code": "ThrottledError",
    "innererror": {
      "code": "ThrottledError",
      "message": "Rate limit of 0 per day is exceeded.",
      "limitValue": 0,
      "moreInfo": "https://aka.ms/api-limits"
    }
  }
}

谁能帮我解决这个问题?

根据您返回结果中的link:

https://aka.ms/api-limits

这取决于响应代码是什么,以及您返回的其他 headers:

If requests are being made at a rate higher than this, then these requests will receive a status code 429 (Too Many Requests) along with the header Retry-After: 60 which indicates the number of seconds until requests to this application are likely to be accepted.

In the event that the Application Insights service is under high load or is down for maintenance, a status code 503 (Service Unavailable) will be returned, and in some cases a Retry-After header may be returned.

如果您使用的是旧定价模式,则会遇到此问题,而如果您使用的是新定价模式,则不会。

除非您最近创建了一个全新的 Application Insights 实例,否则您可能使用的是旧的定价模型。最简单的判断方法是,如果您在 Application Insights 中看到“功能 + 定价”,则您使用的是新模型。

改定价方案没有区别(free/standard/premium之间),油门还在

如果您想迁移到新的定价模式,Microsoft 提供两种选择:

If you’re willing to wait until February 1st, 2017, we will handle the transition automatically for you, and this will be the best option for most customers. Under this approach, we will transition your application to Application Insights Basic in most cases. (Applications using continuous export or the Connector for OMS Log Analytics will be transitioned to Application Insights Enterprise.)

However, if you prefer to use one of the new pricing options immediately, you can also do this. It involves choosing to stop billing for your existing plan (Standard or Premium), then creating a new Application Insights resource within the Azure portal, choosing the pricing option you prefer, and then updating the Instrumentation Key within your application. One downside of doing this is that you will lose the continuity of reporting because you will have the old Instrumentation Key for your application under the Preview plan, and a new Instrumentation Key for your application under the new pricing model.

这可以在 Application Insights pricing page

上作为最后一个常见问题解答项目找到