mirror of
https://github.com/safing/portbase
synced 2025-09-11 07:44:43 +00:00
Add config options for metrics
This commit is contained in:
parent
4a05c26339
commit
aef3f26ad3
4 changed files with 89 additions and 16 deletions
|
@ -90,7 +90,7 @@ func writeMetricsTo(ctx context.Context, url string) error {
|
|||
}
|
||||
|
||||
// Create request
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodPut, url, buf)
|
||||
req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, buf)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create request: %w", err)
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ func writeMetricsTo(ctx context.Context, url string) error {
|
|||
}
|
||||
|
||||
func metricsWriter(ctx context.Context) error {
|
||||
pushURL := pushOption()
|
||||
ticker := time.NewTicker(10 * time.Second)
|
||||
defer ticker.Stop()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue