Skip to content

Commit

Permalink
Update prometheus to v0.50.1 and remove enable_protobuf_negotiation (#…
Browse files Browse the repository at this point in the history
…30934)

Fixes
#30883

Prometheus PR we need to adapt to:
prometheus/prometheus#12738
The configuration option we were using to enable protobuf has been
removed, so this PR removes the `enable_protobuf_negotiation`
configuration on the prometheus receiver. In its place, the prometheus
server now has a config option, `scrape_protocols`, which specifies
which protocols it uses, including protobuf. Use
`config.global.scrape_protocols = [ PrometheusProto,
OpenMetricsText1.0.0, OpenMetricsText0.0.1, PrometheusText0.0.4 ]` to
enable protobuf scraping instead of using our option.

Prometheus PR we need to adapt to:
prometheus/prometheus#12958
We now need to pass a prometheus.Registerer to the scrape manager to
collect metrics about scrapes. This PR disables the collection of these
scrape metrics from the prometheus server. We did not use the default
registry, so we were previously collecting these metrics and never
exposing them. This PR passes a no-op registerer to prevent using memory
to store those metrics. In the future, we can consider using the
prometheus -> OTel bridge to export these with the self-observability
pipeline.
  • Loading branch information
dashpole authored Mar 25, 2024
1 parent f8627a7 commit d64038b
Show file tree
Hide file tree
Showing 51 changed files with 1,465 additions and 1,250 deletions.
27 changes: 27 additions & 0 deletions .chloggen/update-prometheus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: 'breaking'

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: prometheusreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove enable_protobuf_negotiation option on the prometheus receiver. Use config.global.scrape_protocols = [ PrometheusProto, OpenMetricsText1.0.0, OpenMetricsText0.0.1, PrometheusText0.0.4 ] instead.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [30883]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration-file for details on setting scrape_protocols.

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user, api]
29 changes: 15 additions & 14 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ require (
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v5 v5.4.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 // indirect
github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe // indirect
github.com/Azure/go-amqp v1.0.5 // indirect
Expand All @@ -216,6 +216,7 @@ require (
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/ClickHouse/ch-go v0.61.5 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.22.2 // indirect
github.com/Code-Hex/go-generics-cache v1.3.1 // indirect
github.com/DataDog/agent-payload/v5 v5.0.104 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.52.1-0.20240321095122-a3c5dbb936ae // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.52.1-0.20240321095122-a3c5dbb936ae // indirect
Expand Down Expand Up @@ -250,7 +251,7 @@ require (
github.com/Showmax/go-fqdn v1.0.0 // indirect
github.com/aerospike/aerospike-client-go/v6 v6.13.0 // indirect
github.com/alecthomas/participle/v2 v2.1.1 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect
github.com/aliyun/aliyun-log-go-sdk v0.1.71 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/apache/arrow/go/v14 v14.0.2 // indirect
Expand Down Expand Up @@ -291,11 +292,11 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect
github.com/cilium/ebpf v0.9.1 // indirect
github.com/cilium/ebpf v0.11.0 // indirect
github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e // indirect
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/containerd/cgroups/v3 v3.0.3 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/coreos/go-oidc/v3 v3.10.0 // indirect
Expand All @@ -307,7 +308,7 @@ require (
github.com/dennwc/varint v1.0.0 // indirect
github.com/devigned/tab v0.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/digitalocean/godo v1.104.1 // indirect
github.com/digitalocean/godo v1.108.0 // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/docker v25.0.5+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
Expand Down Expand Up @@ -344,7 +345,7 @@ require (
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-resty/resty/v2 v2.7.0 // indirect
github.com/go-resty/resty/v2 v2.11.0 // indirect
github.com/go-sql-driver/mysql v1.8.0 // indirect
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect
github.com/go-zookeeper/zk v1.0.3 // indirect
Expand Down Expand Up @@ -373,7 +374,7 @@ require (
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.2 // indirect
github.com/gophercloud/gophercloud v1.7.0 // indirect
github.com/gophercloud/gophercloud v1.8.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/gosnmp/gosnmp v1.37.0 // indirect
Expand All @@ -398,7 +399,7 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/nomad/api v0.0.0-20230721134942-515895c7690c // indirect
github.com/hashicorp/serf v0.10.1 // indirect
github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect
github.com/hetznercloud/hcloud-go/v2 v2.6.0 // indirect
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
Expand All @@ -407,7 +408,7 @@ require (
github.com/influxdata/influxdb-observability/influx2otel v0.5.8 // indirect
github.com/influxdata/influxdb-observability/otel2influx v0.5.8 // indirect
github.com/influxdata/line-protocol/v2 v2.2.1 // indirect
github.com/ionos-cloud/sdk-go/v6 v6.1.9 // indirect
github.com/ionos-cloud/sdk-go/v6 v6.1.11 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.3 // indirect
github.com/jackc/pgio v1.0.0 // indirect
Expand Down Expand Up @@ -443,7 +444,7 @@ require (
github.com/lib/pq v1.10.9 // indirect
github.com/lightstep/go-expohisto v1.0.0 // indirect
github.com/linkedin/goavro/v2 v2.9.8 // indirect
github.com/linode/linodego v1.23.0 // indirect
github.com/linode/linodego v1.27.1 // indirect
github.com/logicmonitor/lm-data-sdk-go v1.3.0 // indirect
github.com/lufia/plan9stats v0.0.0-20220913051719-115f729f3c8c // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -454,7 +455,7 @@ require (
github.com/mattn/go-sqlite3 v1.14.22 // indirect
github.com/microsoft/ApplicationInsights-Go v0.4.4 // indirect
github.com/microsoft/go-mssqldb v1.7.0 // indirect
github.com/miekg/dns v1.1.56 // indirect
github.com/miekg/dns v1.1.58 // indirect
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
Expand Down Expand Up @@ -563,14 +564,14 @@ require (
github.com/prometheus/common v0.50.0 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/prometheus/prometheus v0.48.1 // indirect
github.com/prometheus/prometheus v0.50.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/redis/go-redis/v9 v9.5.1 // indirect
github.com/relvacode/iso8601 v1.4.0 // indirect
github.com/rs/cors v1.10.1 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21 // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22 // indirect
github.com/scalyr/dataset-go v0.18.0 // indirect
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect
Expand Down
Loading

0 comments on commit d64038b

Please sign in to comment.