Remove outputs blocking inputs when output is slow (#4938)
This commit is contained in:
@@ -144,7 +144,7 @@ func (p *PrometheusClient) auth(h http.Handler) http.Handler {
|
||||
})
|
||||
}
|
||||
|
||||
func (p *PrometheusClient) Start() error {
|
||||
func (p *PrometheusClient) Connect() error {
|
||||
defaultCollectors := map[string]bool{
|
||||
"gocollector": true,
|
||||
"process": true,
|
||||
@@ -200,15 +200,6 @@ func (p *PrometheusClient) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *PrometheusClient) Stop() {
|
||||
// plugin gets cleaned up in Close() already.
|
||||
}
|
||||
|
||||
func (p *PrometheusClient) Connect() error {
|
||||
// This service output does not need to make any further connections
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *PrometheusClient) Close() error {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
|
||||
defer cancel()
|
||||
|
||||
@@ -600,7 +600,7 @@ func TestPrometheusWritePointEmptyTag(t *testing.T) {
|
||||
|
||||
pClient, p, err := setupPrometheus()
|
||||
require.NoError(t, err)
|
||||
defer pClient.Stop()
|
||||
defer pClient.Close()
|
||||
|
||||
now := time.Now()
|
||||
tags := make(map[string]string)
|
||||
@@ -675,7 +675,7 @@ func setupPrometheus() (*PrometheusClient, *prometheus_input.Prometheus, error)
|
||||
pTesting = NewClient()
|
||||
pTesting.Listen = "localhost:9127"
|
||||
pTesting.Path = "/metrics"
|
||||
err := pTesting.Start()
|
||||
err := pTesting.Connect()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user