Skip to content

Commit c9c2c38

Browse files
authored
Update lineproto.go
1 parent 7b8c817 commit c9c2c38

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

remotelog/lineproto.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,17 @@ type LineProto struct {
2727
}
2828

2929
func (l *LineProto) setup() error {
30-
l.BatchSize = config.Setting.LokiBulk * 1024 // Reuse existing config
30+
l.BatchSize = config.Setting.LineProtoiBulk
3131
l.BatchWait = time.Duration(config.Setting.LineProtoTimer) * time.Second
32-
l.URL = config.Setting.LineProtoURL // Use the correct URL config for Line Protocol
33-
32+
l.URL = config.Setting.LineProtoURL
3433
u, err := url.Parse(l.URL)
3534
if err != nil {
3635
return err
3736
}
3837

39-
// Convert Loki URL to InfluxDB URL
4038
u.Path = postPath
4139
q := u.Query()
42-
q.Set("db", "hep") // Default database name
40+
q.Set("db", "hep")
4341
u.RawQuery = q.Encode()
4442
l.URL = u.String()
4543

@@ -175,4 +173,4 @@ func (l *LineProto) sendBatch(batch string) error {
175173
return fmt.Errorf("server returned HTTP status %s (%d)", resp.Status, resp.StatusCode)
176174
}
177175
return nil
178-
}
176+
}

0 commit comments

Comments
 (0)