From 1e70245bdc30be117339d63b6537aa49c9af023f Mon Sep 17 00:00:00 2001 From: Travis Patterson Date: Thu, 11 Apr 2024 10:46:46 -0600 Subject: [PATCH] feat: add warnings to metadata context directly --- pkg/logqlmodel/metadata/context.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/logqlmodel/metadata/context.go b/pkg/logqlmodel/metadata/context.go index 0e70b15be2448..22e267e3aa017 100644 --- a/pkg/logqlmodel/metadata/context.go +++ b/pkg/logqlmodel/metadata/context.go @@ -77,6 +77,12 @@ func (c *Context) Headers() []*definitions.PrometheusResponseHeader { return headers } +func (c *Context) AddWarning(warning string) { + c.mtx.Lock() + defer c.mtx.Unlock() + + c.warnings[warning] = struct{}{} +} func (c *Context) Warnings() []string { c.mtx.Lock() defer c.mtx.Unlock()