Skip to content

Commit 7912a67

Browse files
fix(deps): update module github.com/prometheus/prometheus to v0.307.3 (main) (#19800)
Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: Paul Rogers <[email protected]>
1 parent 9971bba commit 7912a67

File tree

2,110 files changed

+744464
-313417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,110 files changed

+744464
-313417
lines changed

clients/cmd/docker-driver/config.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,12 @@ func relabelConfig(config string, lbs model.LabelSet) (model.LabelSet, error) {
366366
if err := yaml.UnmarshalStrict([]byte(config), &relabelConfig); err != nil {
367367
return nil, err
368368
}
369+
// Validate relabel configs to set the validation scheme properly
370+
for _, rc := range relabelConfig {
371+
if err := rc.Validate(model.UTF8Validation); err != nil {
372+
return nil, err
373+
}
374+
}
369375
relabed, _ := relabel.Process(labels.FromMap(util.ModelLabelSetToMap(lbs)), relabelConfig...)
370376
return model.LabelSet(util.LabelsToMetric(relabed)), nil
371377
}

clients/pkg/promtail/promtail_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ func getPromMetrics(t *testing.T, httpListenAddr net.Addr) ([]byte, string) {
515515
func parsePromMetrics(t *testing.T, bytes []byte, contentType string, metricName string, label string) map[string]float64 {
516516
rb := map[string]float64{}
517517

518-
pr, err := textparse.New(bytes, contentType, "", false, false, false, nil)
518+
pr, err := textparse.New(bytes, contentType, nil, textparse.ParserOptions{})
519519
require.NoError(t, err)
520520
for {
521521
et, err := pr.Next()

clients/pkg/promtail/targets/azureeventhubs/parser.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,21 @@ func (e *messageParser) getLabels(logRecord *azureMonitorResourceLog, relabelCon
203203
var processed labels.Labels
204204
// apply relabeling
205205
if len(relabelConfig) > 0 {
206-
processed, _ = relabel.Process(lbs, relabelConfig...)
206+
// Validate relabel configs to set the validation scheme properly
207+
valid := true
208+
for _, rc := range relabelConfig {
209+
if err := rc.Validate(model.UTF8Validation); err != nil {
210+
// If validation fails, skip relabeling and use original labels
211+
valid = false
212+
break
213+
}
214+
}
215+
// Only process if all configs were validated successfully
216+
if valid {
217+
processed, _ = relabel.Process(lbs, relabelConfig...)
218+
} else {
219+
processed = lbs
220+
}
207221
} else {
208222
processed = lbs
209223
}

clients/pkg/promtail/targets/gcplog/formatter.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,21 @@ func parseGCPLogsEntry(data []byte, other model.LabelSet, otherInternal labels.L
7474

7575
// apply relabeling
7676
if len(relabelConfig) > 0 {
77-
processed, _ = relabel.Process(lbs.Labels(), relabelConfig...)
77+
// Validate relabel configs to set the validation scheme properly
78+
valid := true
79+
for _, rc := range relabelConfig {
80+
if err := rc.Validate(model.UTF8Validation); err != nil {
81+
// If validation fails, skip relabeling and use original labels
82+
valid = false
83+
break
84+
}
85+
}
86+
// Only process if all configs were validated successfully
87+
if valid {
88+
processed, _ = relabel.Process(lbs.Labels(), relabelConfig...)
89+
} else {
90+
processed = lbs.Labels()
91+
}
7892
} else {
7993
processed = lbs.Labels()
8094
}

clients/pkg/promtail/targets/gelf/gelftarget.go

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,26 @@ func (t *Target) handleMessage(msg *gelf.Message) {
122122
lb.Set("__gelf_message_version", msg.Version)
123123
lb.Set("__gelf_message_facility", msg.Facility)
124124

125-
processed, _ := relabel.Process(lb.Labels(), t.relabelConfig...)
125+
var processed labels.Labels
126+
if len(t.relabelConfig) > 0 {
127+
// Validate relabel configs to set the validation scheme properly
128+
valid := true
129+
for _, rc := range t.relabelConfig {
130+
if err := rc.Validate(model.UTF8Validation); err != nil {
131+
// If validation fails, skip relabeling and use original labels
132+
valid = false
133+
break
134+
}
135+
}
136+
// Only process if all configs were validated successfully
137+
if valid {
138+
processed, _ = relabel.Process(lb.Labels(), t.relabelConfig...)
139+
} else {
140+
processed = lb.Labels()
141+
}
142+
} else {
143+
processed = lb.Labels()
144+
}
126145

127146
filtered := make(model.LabelSet)
128147
processed.Range(func(lbl labels.Label) {

clients/pkg/promtail/targets/heroku/target.go

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,26 @@ func (h *Target) drain(w http.ResponseWriter, r *http.Request) {
128128
lb.Set(lokiClient.ReservedLabelTenantID, tenantIDHeaderValue)
129129
}
130130

131-
processed, _ := relabel.Process(lb.Labels(), h.relabelConfigs...)
131+
var processed labels.Labels
132+
if len(h.relabelConfigs) > 0 {
133+
// Validate relabel configs to set the validation scheme properly
134+
valid := true
135+
for _, rc := range h.relabelConfigs {
136+
if err := rc.Validate(model.UTF8Validation); err != nil {
137+
// If validation fails, skip relabeling and use original labels
138+
valid = false
139+
break
140+
}
141+
}
142+
// Only process if all configs were validated successfully
143+
if valid {
144+
processed, _ = relabel.Process(lb.Labels(), h.relabelConfigs...)
145+
} else {
146+
processed = lb.Labels()
147+
}
148+
} else {
149+
processed = lb.Labels()
150+
}
132151

133152
// Start with the set of labels fixed in the configuration
134153
filtered := h.Labels().Clone()

clients/pkg/promtail/targets/kafka/formatter.go

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,26 @@ func format(lbs labels.Labels, cfg []*relabel.Config) model.LabelSet {
1414
if lbs.IsEmpty() {
1515
return nil
1616
}
17-
processed, _ := relabel.Process(lbs, cfg...)
17+
var processed labels.Labels
18+
if len(cfg) > 0 {
19+
// Validate relabel configs to set the validation scheme properly
20+
valid := true
21+
for _, rc := range cfg {
22+
if err := rc.Validate(model.UTF8Validation); err != nil {
23+
// If validation fails, skip relabeling and use original labels
24+
valid = false
25+
break
26+
}
27+
}
28+
// Only process if all configs were validated successfully
29+
if valid {
30+
processed, _ = relabel.Process(lbs, cfg...)
31+
} else {
32+
processed = lbs
33+
}
34+
} else {
35+
processed = lbs
36+
}
1837
labelOut := model.LabelSet(util.LabelsToMetric(processed))
1938
for k := range labelOut {
2039
if strings.HasPrefix(string(k), "__") {

clients/pkg/promtail/targets/syslog/syslogtarget.go

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,26 @@ func (t *SyslogTarget) handleMessageRFC5424(connLabels labels.Labels, msg syslog
149149
}
150150
}
151151

152-
processed, _ := relabel.Process(lb.Labels(), t.relabelConfig...)
152+
var processed labels.Labels
153+
if len(t.relabelConfig) > 0 {
154+
// Validate relabel configs to set the validation scheme properly
155+
valid := true
156+
for _, rc := range t.relabelConfig {
157+
if err := rc.Validate(model.UTF8Validation); err != nil {
158+
// If validation fails, skip relabeling and use original labels
159+
valid = false
160+
break
161+
}
162+
}
163+
// Only process if all configs were validated successfully
164+
if valid {
165+
processed, _ = relabel.Process(lb.Labels(), t.relabelConfig...)
166+
} else {
167+
processed = lb.Labels()
168+
}
169+
} else {
170+
processed = lb.Labels()
171+
}
153172

154173
filtered := make(model.LabelSet)
155174
processed.Range(func(lbl labels.Label) {
@@ -206,7 +225,26 @@ func (t *SyslogTarget) handleMessageRFC3164(connLabels labels.Labels, msg syslog
206225
lb.Set("__syslog_message_msg_id", *v)
207226
}
208227

209-
processed, _ := relabel.Process(lb.Labels(), t.relabelConfig...)
228+
var processed labels.Labels
229+
if len(t.relabelConfig) > 0 {
230+
// Validate relabel configs to set the validation scheme properly
231+
valid := true
232+
for _, rc := range t.relabelConfig {
233+
if err := rc.Validate(model.UTF8Validation); err != nil {
234+
// If validation fails, skip relabeling and use original labels
235+
valid = false
236+
break
237+
}
238+
}
239+
// Only process if all configs were validated successfully
240+
if valid {
241+
processed, _ = relabel.Process(lb.Labels(), t.relabelConfig...)
242+
} else {
243+
processed = lb.Labels()
244+
}
245+
} else {
246+
processed = lb.Labels()
247+
}
210248

211249
filtered := make(model.LabelSet)
212250
processed.Range(func(lbl labels.Label) {

cmd/dataobj-inspect/go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/grafana/loki/cmd/index
22

3-
go 1.25.0
3+
go 1.25.3
44

55
replace github.com/grafana/loki/v3 => ../..
66

@@ -9,7 +9,7 @@ require (
99
github.com/dustin/go-humanize v1.0.1
1010
github.com/fatih/color v1.18.0
1111
github.com/grafana/loki/v3 v3.5.8
12-
github.com/prometheus/prometheus v0.305.1-0.20250806170547-208187eaa19b
12+
github.com/prometheus/prometheus v0.307.3
1313
)
1414

1515
require (
@@ -30,34 +30,34 @@ require (
3030
github.com/golang/snappy v1.0.0 // indirect
3131
github.com/google/flatbuffers v25.2.10+incompatible // indirect
3232
github.com/google/go-cmp v0.7.0 // indirect
33-
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc // indirect
33+
github.com/grafana/regexp v0.0.0-20250905093917-f7b3be9d1853 // indirect
3434
github.com/kamstrup/intmap v0.5.1 // indirect
3535
github.com/klauspost/compress v1.18.1 // indirect
3636
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
3737
github.com/mattn/go-colorable v0.1.14 // indirect
3838
github.com/mattn/go-isatty v0.0.20 // indirect
3939
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4040
github.com/pkg/errors v0.9.1 // indirect
41-
github.com/prometheus/client_golang v1.23.0 // indirect
41+
github.com/prometheus/client_golang v1.23.2 // indirect
4242
github.com/prometheus/client_model v0.6.2 // indirect
43-
github.com/prometheus/common v0.65.1-0.20250703115700-7f8b2a0d32d3 // indirect
43+
github.com/prometheus/common v0.67.2 // indirect
4444
github.com/prometheus/procfs v0.17.0 // indirect
4545
github.com/thanos-io/objstore v0.0.0-20250115091151-a54d0f04b42a // indirect
4646
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
4747
github.com/zeebo/xxh3 v1.0.2 // indirect
48-
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
48+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
4949
go.opentelemetry.io/otel v1.38.0 // indirect
5050
go.opentelemetry.io/otel/metric v1.38.0 // indirect
5151
go.opentelemetry.io/otel/trace v1.38.0 // indirect
5252
go.uber.org/atomic v1.11.0 // indirect
53-
golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc // indirect
54-
golang.org/x/mod v0.28.0 // indirect
53+
go.yaml.in/yaml/v2 v2.4.3 // indirect
54+
golang.org/x/exp v0.0.0-20250808145144-a408d31f581a // indirect
55+
golang.org/x/mod v0.29.0 // indirect
5556
golang.org/x/sync v0.18.0 // indirect
5657
golang.org/x/sys v0.38.0 // indirect
57-
golang.org/x/telemetry v0.0.0-20250908211612-aef8a434d053 // indirect
58+
golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 // indirect
5859
golang.org/x/text v0.30.0 // indirect
59-
golang.org/x/tools v0.37.0 // indirect
60+
golang.org/x/tools v0.38.0 // indirect
6061
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
6162
google.golang.org/protobuf v1.36.10 // indirect
62-
gopkg.in/yaml.v2 v2.4.0 // indirect
6363
)

0 commit comments

Comments
 (0)