stackdriver: remove metric.category alias pattern

After discussions with the Stackdriver team, they did not think this was
needed.
This commit is contained in:
Daniel Lee
2018-09-28 17:16:35 +02:00
parent a25389332c
commit 399e83f91b
3 changed files with 12 additions and 26 deletions
+4 -4
View File
@@ -329,15 +329,15 @@ func TestStackdriver(t *testing.T) {
Convey("and the alias pattern is for metric name", func() {
query := &StackdriverQuery{AliasBy: "metric {{metric.name}} service {{metric.service}} category {{metric.category}}", GroupBys: []string{"metric.label.instance_name", "resource.label.zone"}}
query := &StackdriverQuery{AliasBy: "metric {{metric.name}} service {{metric.service}}", GroupBys: []string{"metric.label.instance_name", "resource.label.zone"}}
err = executor.parseResponse(res, data, query)
So(err, ShouldBeNil)
Convey("Should use alias by formatting and only show instance name", func() {
So(len(res.Series), ShouldEqual, 3)
So(res.Series[0].Name, ShouldEqual, "metric cpu/usage_time service compute category instance")
So(res.Series[1].Name, ShouldEqual, "metric cpu/usage_time service compute category instance")
So(res.Series[2].Name, ShouldEqual, "metric cpu/usage_time service compute category instance")
So(res.Series[0].Name, ShouldEqual, "metric instance/cpu/usage_time service compute")
So(res.Series[1].Name, ShouldEqual, "metric instance/cpu/usage_time service compute")
So(res.Series[2].Name, ShouldEqual, "metric instance/cpu/usage_time service compute")
})
})
})