Skip to content

Commit

Permalink
receiver/prometheus: Update config loading with promslog and remove e…
Browse files Browse the repository at this point in the history
…xpandExternalLabels boolean

Signed-off-by: Arthur Silva Sens <[email protected]>
  • Loading branch information
ArthurSens committed Dec 17, 2024
1 parent f9b819c commit b030e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions receiver/prometheusreceiver/metrics_receiver_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"testing"
"time"

gokitlog "github.com/go-kit/log"
"github.com/gogo/protobuf/proto"
"github.com/prometheus/common/promslog"
promcfg "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/value"
Expand Down Expand Up @@ -163,7 +163,7 @@ func setupMockPrometheus(tds ...*testData) (*mockPrometheus, *PromConfig, error)
for _, t := range tds {
t.attributes = internal.CreateResource(t.name, u.Host, labels.New(l...)).Attributes()
}
pCfg, err := promcfg.Load(string(cfg), false, gokitlog.NewNopLogger())
pCfg, err := promcfg.Load(string(cfg), promslog.NewNopLogger())
return mp, (*PromConfig)(pCfg), err
}

Expand Down
4 changes: 2 additions & 2 deletions receiver/prometheusreceiver/metrics_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"testing"
"time"

gokitlog "github.com/go-kit/log"
"github.com/prometheus/common/model"
"github.com/prometheus/common/promslog"
promConfig "github.com/prometheus/prometheus/config"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -1621,7 +1621,7 @@ scrape_configs:
static_configs:
- targets:
- %s
`, strings.TrimPrefix(svr.URL, "http://")), false, gokitlog.NewNopLogger())
`, strings.TrimPrefix(svr.URL, "http://")), promslog.NewNopLogger())
require.NoError(t, err)
set := receivertest.NewNopSettings()
receiver := newPrometheusReceiver(set, &Config{
Expand Down

0 comments on commit b030e2e

Please sign in to comment.