AWS日志见解将缺席值代替为0
我想为我的无服务器应用程序跟踪 p99 和 p95 。
文档中存在的标准查询建议使用@billduration
/@duration
。
因此,查询看起来像:
stats pct(@duration, 99)
这不符合我的情况,因为对于lambda功能,寒冷的开始时间也将与某些请求相关联。
我的查询应该看起来像:
stats pct(@duration + @initDuration, 99)
但是,在我理解的情况下,这仅考虑冷启动请求,而不是冷启动时间为0时的请求,因此@initduration
five将不存在。因此,此查询给了我 p99 ,而不是整体系统。
有什么办法可以用0替换@initduration ,如果它是空白/不存在的?还是还有其他解决方法可以跟踪Lambdas的实际 p99 / p95 ?
I want to track p99 and p95 for my serverless application.
Standard queries present in the documentation suggest the usage of @billedDuration
/ @duration
.
So the query would look like :
stats pct(@duration, 99)
This does not fit my scenario since for a lambda function, a cold start time would also be associated with some requests.
My query should look something like :
stats pct(@duration + @initDuration, 99)
However, in my understanding, this only considers the cold start requests and not the requests when cold start time was 0 and hence @initDuration
field would be absent. So, this query is giving me p99 of just the cold start requests and not the overall system.
Is there a way I can replace @initDuration
with 0 if it is blank/ not present? Or is there any other workaround to track actual p99/ p95 for lambdas ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将
cocece
函数用于默认@initduration
至0,如果不存在。像这样:You can use the
coalesce
function to default@initDuration
to 0 if not present. Like this: