Frontend Logging: Integrate grafana javascript agent (#50801)

Add Grafana Javascript Agent integration to Grafana
This commit is contained in:
Timur Olzhabayev
2022-06-28 09:25:30 +02:00
committed by GitHub
parent 849d4a3c56
commit 7c886fb6f9
29 changed files with 1496 additions and 36 deletions

View File

@@ -616,4 +616,6 @@ func (hs *HTTPServer) registerRoutes() {
sourceMapStore := frontendlogging.NewSourceMapStore(hs.Cfg, hs.pluginStaticRouteResolver, frontendlogging.ReadSourceMapFromFS)
r.Post("/log", middleware.RateLimit(hs.Cfg.Sentry.EndpointRPS, hs.Cfg.Sentry.EndpointBurst, time.Now),
routing.Wrap(NewFrontendLogMessageHandler(sourceMapStore)))
r.Post("/log-grafana-javascript-agent", middleware.RateLimit(hs.Cfg.GrafanaJavascriptAgent.EndpointRPS, hs.Cfg.GrafanaJavascriptAgent.EndpointBurst, time.Now),
routing.Wrap(GrafanaJavascriptAgentLogMessageHandler(sourceMapStore)))
}