Loki: Add feature flag to enable dataplane-compliant metric frames (#66017)

* loki: add feature flag to enable dataplane-compatible metric frames

* linter fix
This commit is contained in:
Gábor Farkas
2023-04-13 15:07:08 +02:00
committed by GitHub
parent af3bf04f2e
commit 531caec602
36 changed files with 2333 additions and 83 deletions
+6 -6
View File
@@ -28,7 +28,7 @@ func TestApiLogVolume(t *testing.T) {
require.Equal(t, "Source=logvolhist", req.Header.Get("X-Query-Tags"))
})
_, err := api.DataQuery(context.Background(), lokiQuery{Expr: "", SupportingQueryType: SupportingQueryLogsVolume, QueryType: QueryTypeRange})
_, err := api.DataQuery(context.Background(), lokiQuery{Expr: "", SupportingQueryType: SupportingQueryLogsVolume, QueryType: QueryTypeRange}, ResponseOpts{})
require.NoError(t, err)
require.True(t, called)
})
@@ -40,7 +40,7 @@ func TestApiLogVolume(t *testing.T) {
require.Equal(t, "Source=logsample", req.Header.Get("X-Query-Tags"))
})
_, err := api.DataQuery(context.Background(), lokiQuery{Expr: "", SupportingQueryType: SupportingQueryLogsSample, QueryType: QueryTypeRange})
_, err := api.DataQuery(context.Background(), lokiQuery{Expr: "", SupportingQueryType: SupportingQueryLogsSample, QueryType: QueryTypeRange}, ResponseOpts{})
require.NoError(t, err)
require.True(t, called)
})
@@ -52,7 +52,7 @@ func TestApiLogVolume(t *testing.T) {
require.Equal(t, "Source=datasample", req.Header.Get("X-Query-Tags"))
})
_, err := api.DataQuery(context.Background(), lokiQuery{Expr: "", SupportingQueryType: SupportingQueryDataSample, QueryType: QueryTypeRange})
_, err := api.DataQuery(context.Background(), lokiQuery{Expr: "", SupportingQueryType: SupportingQueryDataSample, QueryType: QueryTypeRange}, ResponseOpts{})
require.NoError(t, err)
require.True(t, called)
})
@@ -64,7 +64,7 @@ func TestApiLogVolume(t *testing.T) {
require.Equal(t, "", req.Header.Get("X-Query-Tags"))
})
_, err := api.DataQuery(context.Background(), lokiQuery{Expr: "", SupportingQueryType: SupportingQueryNone, QueryType: QueryTypeRange})
_, err := api.DataQuery(context.Background(), lokiQuery{Expr: "", SupportingQueryType: SupportingQueryNone, QueryType: QueryTypeRange}, ResponseOpts{})
require.NoError(t, err)
require.True(t, called)
})
@@ -133,7 +133,7 @@ func TestApiUrlHandling(t *testing.T) {
QueryType: QueryTypeRange,
}
_, err := api.DataQuery(context.Background(), query)
_, err := api.DataQuery(context.Background(), query, ResponseOpts{})
require.NoError(t, err)
require.True(t, called)
})
@@ -154,7 +154,7 @@ func TestApiUrlHandling(t *testing.T) {
QueryType: QueryTypeInstant,
}
_, err := api.DataQuery(context.Background(), query)
_, err := api.DataQuery(context.Background(), query, ResponseOpts{})
require.NoError(t, err)
require.True(t, called)
})