Skip to content

Commit

Permalink
Merge branch 'main' into gtk-grafana/line-filters-from-explore
Browse files Browse the repository at this point in the history
  • Loading branch information
gtk-grafana authored Jan 15, 2025
2 parents 4548823 + df4ee99 commit ddfd406
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
func main() {
url := flag.String("url", "http://localhost:3100/loki/api/v1/push", "Loki URL")
dry := flag.Bool("dry", false, "Dry run: log to stdout instead of Loki")
tenantId := flag.String("tenant-id", "", "Loki tenant ID")
flag.Parse()

cfg, err := loki.NewDefaultConfig(*url)
Expand All @@ -27,6 +28,11 @@ func main() {
cfg.BackoffConfig.MaxRetries = 1
cfg.BackoffConfig.MinBackoff = 100 * time.Millisecond
cfg.BackoffConfig.MaxBackoff = 100 * time.Millisecond

if *tenantId != "" {
cfg.TenantID = *tenantId
}

client, err := loki.New(cfg)
if err != nil {
panic(err)
Expand Down

0 comments on commit ddfd406

Please sign in to comment.