From 09c759b36c520c69038dc21b7fdc504df058b0db Mon Sep 17 00:00:00 2001 From: Michael Mandrus <41969079+mmandrus@users.noreply.github.com> Date: Fri, 30 Dec 2022 13:53:42 -0500 Subject: [PATCH] Graphite: Fix bug in wildcard queries to Graphite plugin (#60549) * commit something that works, need to figure out scoping issues * clean up now that I know about addressable values --- pkg/tsdb/graphite/graphite.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/tsdb/graphite/graphite.go b/pkg/tsdb/graphite/graphite.go index cc4e388b784..a2c6416391d 100644 --- a/pkg/tsdb/graphite/graphite.go +++ b/pkg/tsdb/graphite/graphite.go @@ -173,8 +173,13 @@ func (s *Service) QueryData(ctx context.Context, req *backend.QueryDataRequest) } for _, f := range frames { - result.Responses[f.Name] = backend.DataResponse{ - Frames: data.Frames{f}, + if resp, ok := result.Responses[f.Name]; ok { + resp.Frames = append(resp.Frames, f) + result.Responses[f.Name] = resp + } else { + result.Responses[f.Name] = backend.DataResponse{ + Frames: data.Frames{f}, + } } }