Skip to content

Commit

Permalink
fix appending of grafana base url (#824)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel authored Jan 22, 2024
1 parent 349d480 commit 587c16c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func BytesToAnyTomlStruct(logger zerolog.Logger, filename, configurationName str
return err
}

err = toml.Unmarshal(marshalled, &target)
err = toml.Unmarshal(marshalled, target)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions logstream/logstream_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ func (h *LokiLogHandler) GetLogLocation(consumers map[string]*ContainerLogConsum
}

relativeUrl := sb.String()
sb.WriteString(baseUrl)
h.grafanaUrl = sb.String()
h.grafanaUrl = baseUrl + sb.String()

// try to shorten the URL only if we have all the required configuration parameters
if baseUrl != "" && dabshoardUrl != "" && h.loggingConfig.Grafana.BearerToken != nil {
Expand Down

0 comments on commit 587c16c

Please sign in to comment.