mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 17:45:55 +08:00
chore: suggestion
This commit is contained in:
parent
77e44d7a1e
commit
110442b272
@ -90,10 +90,10 @@ func (q *promqlQuery) Execute(ctx context.Context) (*qbv5.Result, error) {
|
|||||||
for _, v := range matrix {
|
for _, v := range matrix {
|
||||||
var s qbv5.TimeSeries
|
var s qbv5.TimeSeries
|
||||||
lbls := make([]*qbv5.Label, 0, len(v.Metric))
|
lbls := make([]*qbv5.Label, 0, len(v.Metric))
|
||||||
for k, v := range v.Metric.Copy().Map() {
|
for name, value := range v.Metric.Copy().Map() {
|
||||||
lbls = append(lbls, &qbv5.Label{
|
lbls = append(lbls, &qbv5.Label{
|
||||||
Key: telemetrytypes.TelemetryFieldKey{Name: k},
|
Key: telemetrytypes.TelemetryFieldKey{Name: name},
|
||||||
Value: v,
|
Value: value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ func (q *promqlQuery) Execute(ctx context.Context) (*qbv5.Result, error) {
|
|||||||
warnings, _ := res.Warnings.AsStrings(q.query.Query, 10, 0)
|
warnings, _ := res.Warnings.AsStrings(q.query.Query, 10, 0)
|
||||||
|
|
||||||
return &qbv5.Result{
|
return &qbv5.Result{
|
||||||
Type: qbv5.RequestTypeTimeSeries,
|
Type: q.requestType,
|
||||||
Value: []*qbv5.TimeSeriesData{
|
Value: []*qbv5.TimeSeriesData{
|
||||||
{
|
{
|
||||||
QueryName: q.query.Name,
|
QueryName: q.query.Name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user