[英]Can't filter custom metrics in google cloud monitoring with tags
I registered stats with opencensus and attached tags thanks to a StackDriver exporter:由于 StackDriver 导出器,我使用 opencensus 注册了统计数据并附加了标签:
ctx, err = tag.New(ctx, tag.Upsert(key, val))
stats.Record(ctx, []stats.Measurement{csqAverage.M(m)}...)
In the metric explorer, I can see the metrics, but I can't see or filter with the associated tag.在指标资源管理器中,我可以看到指标,但无法查看或使用关联标签进行过滤。 When I retrieve the resources thanks to the REST API, I don't see tags at all, and this kind of property is not mentionened in the documentation describing a metric.当我通过 REST API 检索资源时,我根本看不到标签,并且在描述指标的文档中没有提到这种属性。 However, the gcloud documentation indicates that opencensus tag can be exported to filter the metrics.但是,gcloud 文档表明可以导出 opencensus 标签来过滤指标。
TagKeys 必须在注册的视图中声明。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.