首页 > 解决方案 > ESP 中的“未向 CloudTrace 发送请求:无跟踪或 project_id 为空”日志

问题描述

我正在使用 gcloud ESP 代理,并且每秒都会发生这些日志:

2020/03/17 02:47:38[debug]9#9: Not sending request to CloudTrace: no traces or project_id is empty.
2020/03/17 02:47:39[debug]9#9: Not sending request to CloudTrace: no traces or project_id is empty.
2020/03/17 02:47:40[debug]9#9: Not sending request to CloudTrace: no traces or project_id is empty.
2020/03/17 02:47:41[debug]9#9: Not sending request to CloudTrace: no traces or project_id is empty.
2020/03/17 02:47:42[debug]9#9: Not sending request to CloudTrace: no traces or project_id is empty.

我尝试使用 --disable_cloud_trace_auto_sampling 运行 esp 容器,但没有帮助。我真的很想使这些日志保持沉默,如果您有任何猜测可能是什么,请告诉我。

标签: gcloud

解决方案


通过创建排除查询,您可以控制排除(丢弃)哪些日志条目。

您可以创建排除查询以丢弃特定日志。随后,您还可以查阅高级过滤器文档,以了解如何创建特定查询以排除不需要的日志。

表达式 = ["NOT"] 比较 { ("AND" | "OR") ["NOT"] 比较}

例子:

resource.type = "gce_instance" AND
                 severity >= ERROR AND
                 NOT textPayload:robot

推荐阅读