Skip to content

Commit

Permalink
chore: minor grafana fix
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Nov 15, 2024
1 parent 00836b3 commit 2e77ff1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions frontend/cli/cmd_serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ func (s *serveCmd) run(
if !s.DisableGrafana && !bool(s.ObservabilityConfig.ExportOTEL) {
err := dev.SetupGrafana(ctx, s.GrafanaImage)
if err != nil {
return fmt.Errorf("failed to setup grafana image: %w", err)
logger.Errorf(err, "Failed to setup grafana image")
} else {
logger.Infof("Grafana started at http://localhost:3000")
os.Setenv("OTEL_EXPORTER_OTLP_ENDPOINT", "http://localhost:4317")
os.Setenv("OTEL_METRIC_EXPORT_INTERVAL", "1000")
s.ObservabilityConfig.ExportOTEL = true
}
os.Setenv("OTEL_EXPORTER_OTLP_ENDPOINT", "http://localhost:4317")
os.Setenv("OTEL_METRIC_EXPORT_INTERVAL", "1000")
s.ObservabilityConfig.ExportOTEL = true
}
err := observability.Init(ctx, false, "", "ftl-serve", ftl.Version, s.ObservabilityConfig)
if err != nil {
Expand Down

0 comments on commit 2e77ff1

Please sign in to comment.