Commit 10d36b28 by Paul Traylor Committed by Torkel Ödegaard

Renderer: Add user-agent to rendering plugin requests (#20956)

parent 4ba5d946
......@@ -10,6 +10,8 @@ import (
"os"
"strconv"
"time"
"github.com/grafana/grafana/pkg/setting"
)
var netTransport = &http.Transport{
......@@ -56,6 +58,8 @@ func (rs *RenderingService) renderViaHttp(ctx context.Context, opts Opts) (*Rend
return nil, err
}
req.Header.Set("User-Agent", fmt.Sprintf("Grafana/%s", setting.BuildVersion))
reqContext, cancel := context.WithTimeout(ctx, opts.Timeout+time.Second*2)
defer cancel()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment