diff --git a/lib/config/logging.go b/lib/config/logging.go index a050491bd..71f706a32 100644 --- a/lib/config/logging.go +++ b/lib/config/logging.go @@ -91,6 +91,7 @@ func (l *LokiConfig) Validate() error { type GrafanaConfig struct { BaseUrl *string `toml:"base_url"` + BaseUrlGap *string `toml:"base_url_gap"` // Base URL for the dashboard via GAP proxy used on CI DashboardUrl *string `toml:"dashboard_url"` DashboardUID *string `toml:"dashboard_uid"` // UID of the dashboard to put annotations on BearerToken *string `toml:"-"` diff --git a/lib/logstream/logstream_handlers.go b/lib/logstream/logstream_handlers.go index b95780978..c2be5cdf8 100644 --- a/lib/logstream/logstream_handlers.go +++ b/lib/logstream/logstream_handlers.go @@ -166,8 +166,8 @@ func (h *LokiLogHandler) GetLogLocation(consumers map[string]*ContainerLogConsum // if no Grafana URL has been set lets at least print query parameters that can be manually added to the dashboard url baseUrl := "" - if h.loggingConfig.Grafana != nil && h.loggingConfig.Grafana.BaseUrl != nil { - baseUrl = *h.loggingConfig.Grafana.BaseUrl + if h.loggingConfig.Grafana != nil && h.loggingConfig.Grafana.BaseUrlGap != nil { + baseUrl = *h.loggingConfig.Grafana.BaseUrlGap baseUrl = strings.TrimSuffix(baseUrl, "/") baseUrl = baseUrl + "/" }