Skip to content

Commit

Permalink
feat: add warnings to metadata context directly (grafana#12579)
Browse files Browse the repository at this point in the history
  • Loading branch information
MasslessParticle authored Apr 12, 2024
1 parent 5e21ffa commit c4ac8cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/logqlmodel/metadata/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c4ac8cc

Please sign in to comment.