英文:
Can't filter custom metrics in google cloud monitoring with tags
问题
我使用opencensus注册了统计信息,并通过StackDriver导出器附加了标签:
ctx, err = tag.New(ctx, tag.Upsert(key, val))
stats.Record(ctx, []stats.Measurement{csqAverage.M(m)}...)
在指标浏览器中,我可以看到指标,但无法看到或使用相关的标签进行筛选。当我通过REST API检索资源时,根本看不到标签,并且在描述指标的文档中也没有提到这种属性。然而,gcloud文档指出opencensus标签可以导出以筛选指标。
英文:
I registered stats with opencensus and attached tags thanks to a StackDriver exporter:
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. However, the gcloud documentation indicates that opencensus tag can be exported to filter the metrics.
答案1
得分: 1
TagKeys必须在注册的视图中声明。
英文:
TagKeys must be declared in the registered view.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论