Skip to content

Commit

Permalink
Vendor update mimir-prometheus at 320e9aa3985d0f997a125b1a58a4ff8d1ae… (
Browse files Browse the repository at this point in the history
#10102)

* Vendor update mimir-prometheus at 320e9aa3985d0f997a125b1a58a4ff8d1aea2dc2

This is syncing with Prometheus at
https://github.com/prometheus/prometheus/tree/f9057544cb69261acd59628c2e81369adeb584c9

Which was updated into mimir-prometheus in
grafana/mimir-prometheus#781

Signed-off-by: György Krajcsovits <[email protected]>

* Run make generate-otlp

Signed-off-by: György Krajcsovits <[email protected]>

* Fix missing argument in distributor/otel_test.go

Hardcode allow UTF-8 to false for now.

Signed-off-by: György Krajcsovits <[email protected]>

* Hardcode no UTF-8 in distributor/otel.go for now + TODO

Signed-off-by: György Krajcsovits <[email protected]>

---------

Signed-off-by: György Krajcsovits <[email protected]>
  • Loading branch information
krajorama authored Dec 3, 2024
1 parent 8bfd96f commit 832f589
Show file tree
Hide file tree
Showing 23 changed files with 449 additions and 213 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ require (
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/exporter-toolkit v0.13.0 // indirect
github.com/prometheus/exporter-toolkit v0.13.1 // indirect
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be // indirect
github.com/rs/cors v1.11.0 // indirect
github.com/rs/xid v1.6.0 // indirect
Expand Down Expand Up @@ -284,7 +284,7 @@ require (
)

// Using a fork of Prometheus with Mimir-specific changes.
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20241202100552-120c71abae28
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20241203165959-320e9aa3985d

// Replace memberlist with our fork which includes some fixes that haven't been
// merged upstream yet:
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1279,8 +1279,8 @@ github.com/grafana/gomemcache v0.0.0-20241016125027-0a5bcc5aef40 h1:1TeKhyS+pvzO
github.com/grafana/gomemcache v0.0.0-20241016125027-0a5bcc5aef40/go.mod h1:IGRj8oOoxwJbHBYl1+OhS9UjQR0dv6SQOep7HqmtyFU=
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe h1:yIXAAbLswn7VNWBIvM71O2QsgfgW9fRXZNR0DXe6pDU=
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/grafana/mimir-prometheus v0.0.0-20241202100552-120c71abae28 h1:aZcCAcjvHFNcpqnWOpdCjvKqA1jN1syHKYxFFrQBYYc=
github.com/grafana/mimir-prometheus v0.0.0-20241202100552-120c71abae28/go.mod h1:zJ8WD0NpeWRafBVPm243oe6z1PFcQGEsX71fIwVsycs=
github.com/grafana/mimir-prometheus v0.0.0-20241203165959-320e9aa3985d h1:ia2JbmaZA2VUP9HoE5wDjNmR3ZyJYH1yAodg/KoX/IY=
github.com/grafana/mimir-prometheus v0.0.0-20241203165959-320e9aa3985d/go.mod h1:SLFE244uZpIWNevAuaMLJmsy5QluDTSUwLKKGK3jkk0=
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956 h1:em1oddjXL8c1tL0iFdtVtPloq2hRPen2MJQKoAWpxu0=
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU=
github.com/grafana/prometheus-alertmanager v0.25.1-0.20240930132144-b5e64e81e8d3 h1:6D2gGAwyQBElSrp3E+9lSr7k8gLuP3Aiy20rweLWeBw=
Expand Down Expand Up @@ -1615,8 +1615,8 @@ github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPA
github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4=
github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI=
github.com/prometheus/exporter-toolkit v0.13.0 h1:lmA0Q+8IaXgmFRKw09RldZmZdnvu9wwcDLIXGmTPw1c=
github.com/prometheus/exporter-toolkit v0.13.0/go.mod h1:2uop99EZl80KdXhv/MxVI2181fMcwlsumFOqBecGkG0=
github.com/prometheus/exporter-toolkit v0.13.1 h1:Evsh0gWQo2bdOHlnz9+0Nm7/OFfIwhE2Ws4A2jIlR04=
github.com/prometheus/exporter-toolkit v0.13.1/go.mod h1:ujdv2YIOxtdFxxqtloLpbqmxd5J0Le6IITUvIRSWjj0=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
Expand Down Expand Up @@ -1791,8 +1791,8 @@ go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U=
go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M=
go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8=
go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE=
go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg=
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM=
go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y=
go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM=
Expand Down
5 changes: 3 additions & 2 deletions pkg/distributor/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ func otelMetricsToMetadata(addSuffixes bool, md pmetric.Metrics) []*mimirpb.Metr
for k := 0; k < scopeMetrics.Metrics().Len(); k++ {
metric := scopeMetrics.Metrics().At(k)
entry := mimirpb.MetricMetadata{
Type: otelMetricTypeToMimirMetricType(metric),
MetricFamilyName: prometheustranslator.BuildCompliantName(metric, "", addSuffixes),
Type: otelMetricTypeToMimirMetricType(metric),
// TODO(krajorama): when UTF-8 is configurable from user limits, replace "false" appropriately.
MetricFamilyName: prometheustranslator.BuildCompliantName(metric, "", addSuffixes, false),
Help: metric.Description(),
Unit: metric.Unit(),
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/distributor/otel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestOTelMetricsToTimeSeries(t *testing.T) {
// Ignore, as these labels are generated from service.name and service.instance.id
continue
default:
k = prometheustranslator.NormalizeLabel(k)
k = prometheustranslator.NormalizeLabel(k, false)
}
expTargetInfoLabels = append(expTargetInfoLabels, mimirpb.LabelAdapter{
Name: k,
Expand Down
6 changes: 3 additions & 3 deletions pkg/distributor/otlp/helper_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pkg/distributor/otlp/metrics_to_prw_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 27 additions & 2 deletions vendor/github.com/prometheus/prometheus/config/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 11 additions & 17 deletions vendor/github.com/prometheus/prometheus/promql/promqltest/test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions vendor/github.com/prometheus/prometheus/scrape/manager.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 832f589

Please sign in to comment.