Skip to content

Commit c731377

Browse files
authored
chore: upgrade dskit (#4311)
* chore: upgrade dskit * Fix tests * Bump prometheus as well * Make change more consistent * Add go build flag to a few more places * Remove build tag, cleanup dependencies * Tidy up some more * Add route injector middleware * Add missing route matcher * Fix flaky test * Bump again after rebase
1 parent 624ebc1 commit c731377

File tree

23 files changed

+417
-147
lines changed

23 files changed

+417
-147
lines changed

api/go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ require (
1818
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
1919
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
2020
github.com/rogpeppe/go-internal v1.13.1 // indirect
21-
go.opentelemetry.io/otel v1.36.0 // indirect
21+
go.opentelemetry.io/otel v1.37.0 // indirect
22+
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
2223
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
2324
golang.org/x/net v0.41.0 // indirect
2425
golang.org/x/sys v0.33.0 // indirect

api/go.sum

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ connectrpc.com/connect v1.18.1 h1:PAg7CjSAGvscaf6YZKUefjoih5Z/qYkyaTrBW8xvYPw=
22
connectrpc.com/connect v1.18.1/go.mod h1:0292hj1rnx8oFrStN7cB4jjVBeqs+Yx5yDIC2prWDO8=
33
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
44
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
6-
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
5+
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
76
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
87
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
98
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
@@ -32,16 +31,12 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
3231
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
3332
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
3433
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
35-
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
36-
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
37-
go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE=
38-
go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs=
39-
go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs=
40-
go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY=
34+
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
35+
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
36+
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
4137
go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis=
4238
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
43-
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
44-
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
39+
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
4540
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
4641
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
4742
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=

cmd/pyroscope/help-all.txt.tmpl

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,12 @@ Usage of ./pyroscope:
335335
Output log messages in the given format. Valid formats: [logfmt, json] (default "logfmt")
336336
-log.level value
337337
Only log messages with the given severity or above. Valid levels: [debug, info, warn, error] (default info)
338+
-memberlist.abort-if-fast-join-fails
339+
Abort if this node fails the fast memberlist cluster joining procedure at startup. When enabled, it's guaranteed that other services, depending on memberlist, have an updated view over the cluster state when they're started.
338340
-memberlist.abort-if-join-fails
339-
If this node fails to join memberlist cluster, abort.
341+
Abort if this node fails to join memberlist cluster at startup. When enabled, it's not guaranteed that other services are started only after the cluster state has been successfully updated; use 'abort-if-fast-join-fails' instead.
342+
-memberlist.acquire-writer-timeout duration
343+
Timeout for acquiring one of the concurrent write slots. After this time, the message will be dropped. (default 250ms)
340344
-memberlist.advertise-addr string
341345
Gossip address to advertise to other members in the cluster. Used for NAT traversal.
342346
-memberlist.advertise-port int
@@ -345,6 +349,8 @@ Usage of ./pyroscope:
345349
IP address to listen on for gossip messages. Multiple addresses may be specified. Defaults to 0.0.0.0
346350
-memberlist.bind-port int
347351
Port to listen on for gossip messages. (default 7946)
352+
-memberlist.broadcast-timeout-for-local-updates-on-shutdown duration
353+
Timeout for broadcasting all remaining locally-generated updates to other nodes when shutting down. Only used if there are nodes left in the memberlist cluster, and only applies to locally-generated updates, not to broadcast messages that are result of incoming gossip updates. 0 = no timeout, wait until all locally-generated updates are sent. (default 10s)
348354
-memberlist.cluster-label string
349355
The cluster label is an optional string to include in outbound packets and gossip streams. Other members in the memberlist cluster will discard any message whose label doesn't match the configured one, unless the 'cluster-label-verification-disabled' configuration option is set to true.
350356
-memberlist.cluster-label-verification-disabled
@@ -365,6 +371,8 @@ Usage of ./pyroscope:
365371
Timeout for leaving memberlist cluster. (default 20s)
366372
-memberlist.left-ingesters-timeout duration
367373
How long to keep LEFT ingesters in the ring. (default 5m0s)
374+
-memberlist.max-concurrent-writes int
375+
Maximum number of concurrent writes to other nodes. (default 3)
368376
-memberlist.max-join-backoff duration
369377
Max backoff duration to join other cluster members. (default 1m0s)
370378
-memberlist.max-join-retries int
@@ -375,6 +383,10 @@ Usage of ./pyroscope:
375383
Min backoff duration to join other cluster members. (default 1s)
376384
-memberlist.nodename string
377385
Name of the node in memberlist cluster. Defaults to hostname.
386+
-memberlist.notify-interval duration
387+
How frequently to notify watchers when a key changes. Can reduce CPU activity in large memberlist deployments. 0 to notify without delay.
388+
-memberlist.obsolete-entries-timeout duration
389+
[experimental] How long to keep obsolete entries in the KV store. (default 30s)
378390
-memberlist.packet-dial-timeout duration
379391
Timeout used when connecting to other nodes to send packet. (default 2s)
380392
-memberlist.packet-write-timeout duration
@@ -388,7 +400,7 @@ Usage of ./pyroscope:
388400
-memberlist.retransmit-factor int
389401
Multiplication factor used when sending out messages (factor * log(N+1)). (default 4)
390402
-memberlist.stream-timeout duration
391-
The timeout for establishing a connection with a remote node, and for read/write operations. (default 10s)
403+
The timeout for establishing a connection with a remote node, and for read/write operations. (default 2s)
392404
-memberlist.tls-ca-path string
393405
Path to the CA certificates to validate server certificate against. If not set, the host's root CA certificates are used.
394406
-memberlist.tls-cert-path string
@@ -407,6 +419,8 @@ Usage of ./pyroscope:
407419
Override the expected name on the server certificate.
408420
-memberlist.transport-debug
409421
Log debug transport messages. Note: global log.level must be at debug level as well.
422+
-memberlist.watch-prefix-buffer-size int
423+
Size of the buffered channel for the WatchPrefix function. (default 128)
410424
-modules
411425
List available modules that can be used as target and exit.
412426
-multi.mirror-enabled
@@ -513,6 +527,8 @@ Usage of ./pyroscope:
513527
Enable backoff and retry when we hit rate limits.
514528
-querier.frontend-client.backoff-retries int
515529
Number of times to backoff and retry before failing. (default 10)
530+
-querier.frontend-client.cluster-validation.label string
531+
[experimental] Optionally define the cluster validation label.
516532
-querier.frontend-client.connect-backoff-base-delay duration
517533
Initial backoff delay after first connection failure. Only relevant if ConnectTimeout > 0. (default 1s)
518534
-querier.frontend-client.connect-backoff-max-delay duration
@@ -583,6 +599,8 @@ Usage of ./pyroscope:
583599
Enable backoff and retry when we hit rate limits.
584600
-query-frontend.grpc-client-config.backoff-retries int
585601
Number of times to backoff and retry before failing. (default 10)
602+
-query-frontend.grpc-client-config.cluster-validation.label string
603+
[experimental] Optionally define the cluster validation label.
586604
-query-frontend.grpc-client-config.connect-backoff-base-delay duration
587605
Initial backoff delay after first connection failure. Only relevant if ConnectTimeout > 0. (default 1s)
588606
-query-frontend.grpc-client-config.connect-backoff-max-delay duration
@@ -637,6 +655,8 @@ Usage of ./pyroscope:
637655
Enable backoff and retry when we hit rate limits.
638656
-query-scheduler.grpc-client-config.backoff-retries int
639657
Number of times to backoff and retry before failing. (default 10)
658+
-query-scheduler.grpc-client-config.cluster-validation.label string
659+
[experimental] Optionally define the cluster validation label.
640660
-query-scheduler.grpc-client-config.connect-backoff-base-delay duration
641661
Initial backoff delay after first connection failure. Only relevant if ConnectTimeout > 0. (default 1s)
642662
-query-scheduler.grpc-client-config.connect-backoff-max-delay duration
@@ -765,8 +785,24 @@ Usage of ./pyroscope:
765785
(default 5)
766786
-self-profiling.use-k6-middleware
767787
Read k6 labels from request headers and set them as dynamic profile tags.
788+
-server.cluster-validation.grpc.enabled
789+
[experimental] When enabled, cluster label validation is executed: configured cluster validation label is compared with the cluster validation label received through the requests.
790+
-server.cluster-validation.grpc.soft-validation
791+
[experimental] When enabled, soft cluster label validation is executed. Can be enabled only together with server.cluster-validation.grpc.enabled
792+
-server.cluster-validation.http.enabled
793+
[experimental] When enabled, cluster label validation is executed: configured cluster validation label is compared with the cluster validation label received through the requests.
794+
-server.cluster-validation.http.excluded-paths comma-separated-list-of-strings
795+
[experimental] Comma-separated list of url paths that are excluded from the cluster validation check.
796+
-server.cluster-validation.http.excluded-user-agents comma-separated-list-of-strings
797+
[experimental] Comma-separated list of user agents that are excluded from the cluster validation check.
798+
-server.cluster-validation.http.soft-validation
799+
[experimental] When enabled, soft cluster label validation is executed. Can be enabled only together with server.cluster-validation.http.enabled
800+
-server.cluster-validation.label string
801+
[experimental] Optionally define the cluster validation label.
768802
-server.graceful-shutdown-timeout duration
769803
Timeout for graceful shutdowns (default 30s)
804+
-server.grpc-collect-max-streams-by-conn
805+
If true, the max streams by connection gauge will be collected. (default true)
770806
-server.grpc-conn-limit int
771807
Maximum number of simultaneous grpc connections, <=0 to disable
772808
-server.grpc-listen-address string
@@ -805,6 +841,10 @@ Usage of ./pyroscope:
805841
After having pinged for keepalive check, the duration after which an idle connection should be closed, Default: 20s (default 20s)
806842
-server.grpc.num-workers int
807843
If non-zero, configures the amount of GRPC server workers used to serve the requests.
844+
-server.grpc.recv-buffer-pools-enabled
845+
Deprecated option, has no effect and will be removed in a future version.
846+
-server.grpc.stats-tracking-enabled
847+
If true, the request_message_bytes, response_message_bytes, and inflight_requests metrics will be tracked. Enabling this option prevents the use of memory pools for parsing gRPC request bodies and may lead to more memory allocations. (default true)
808848
-server.http-conn-limit int
809849
Maximum number of simultaneous http connections, <=0 to disable
810850
-server.http-idle-timeout duration
@@ -839,20 +879,32 @@ Usage of ./pyroscope:
839879
Comma separated list of headers to exclude from loggin. Only used if server.log-request-headers is true.
840880
-server.log-source-ips-enabled
841881
Optionally log the source IPs.
882+
-server.log-source-ips-full
883+
Log all source IPs instead of only the originating one. Only used if server.log-source-ips-enabled is true
842884
-server.log-source-ips-header string
843885
Header field storing the source IPs. Only used if server.log-source-ips-enabled is true. If not set the default Forwarded, X-Real-IP and X-Forwarded-For headers are used
844886
-server.log-source-ips-regex string
845887
Regex for matching the source IPs. Only used if server.log-source-ips-enabled is true. If not set the default Forwarded, X-Real-IP and X-Forwarded-For headers are used
846888
-server.path-prefix string
847889
Base path to serve all API routes from (e.g. /v1/)
890+
-server.proxy-protocol-enabled
891+
Enables PROXY protocol.
848892
-server.register-instrumentation
849893
Register the intrumentation handlers (/metrics etc). (default true)
850894
-server.report-grpc-codes-in-instrumentation-label-enabled
851895
If set to true, gRPC statuses will be reported in instrumentation labels with their string representations. Otherwise, they will be reported as "error".
896+
-server.throughput.latency-cutoff duration
897+
Requests taking over the cutoff are be observed to measure throughput. Server-Timing header is used with specified unit as the indicator, for example 'Server-Timing: unit;val=8.2'. If set to 0, the throughput is not calculated.
898+
-server.throughput.unit string
899+
Unit of the server throughput metric, for example 'processed_bytes' or 'samples_processed'. Observed values are gathered from the 'Server-Timing' header with the 'val' key. If set, it is appended to the request_server_throughput metric name. (default "samples_processed")
852900
-server.tls-cipher-suites string
853901
Comma-separated list of cipher suites to use. If blank, the default Go cipher suites is used.
854902
-server.tls-min-version string
855903
Minimum TLS version to use. Allowed values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13. If blank, the Go TLS minimum version is used.
904+
-server.trace-request-headers
905+
Optionally add request headers to tracing spans.
906+
-server.trace-request-headers-exclude-list string
907+
Comma separated list of headers to exclude from tracing spans. Only used if server.trace-request-headers is true. The following headers are always excluded: Authorization, Cookie, X-Csrf-Token.
856908
-shutdown-delay duration
857909
Wait time before shutting down after a termination signal.
858910
-storage.azure.account-key string

cmd/pyroscope/help.txt.tmpl

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Usage of ./pyroscope:
110110
-log.level value
111111
Only log messages with the given severity or above. Valid levels: [debug, info, warn, error] (default info)
112112
-memberlist.abort-if-join-fails
113-
If this node fails to join memberlist cluster, abort.
113+
Abort if this node fails to join memberlist cluster at startup. When enabled, it's not guaranteed that other services are started only after the cluster state has been successfully updated; use 'abort-if-fast-join-fails' instead.
114114
-memberlist.advertise-addr string
115115
Gossip address to advertise to other members in the cluster. Used for NAT traversal.
116116
-memberlist.advertise-port int
@@ -201,6 +201,8 @@ Usage of ./pyroscope:
201201
Read k6 labels from request headers and set them as dynamic profile tags.
202202
-server.graceful-shutdown-timeout duration
203203
Timeout for graceful shutdowns (default 30s)
204+
-server.grpc-collect-max-streams-by-conn
205+
If true, the max streams by connection gauge will be collected. (default true)
204206
-server.grpc-conn-limit int
205207
Maximum number of simultaneous grpc connections, <=0 to disable
206208
-server.grpc-listen-address string
@@ -239,6 +241,10 @@ Usage of ./pyroscope:
239241
After having pinged for keepalive check, the duration after which an idle connection should be closed, Default: 20s (default 20s)
240242
-server.grpc.num-workers int
241243
If non-zero, configures the amount of GRPC server workers used to serve the requests.
244+
-server.grpc.recv-buffer-pools-enabled
245+
Deprecated option, has no effect and will be removed in a future version.
246+
-server.grpc.stats-tracking-enabled
247+
If true, the request_message_bytes, response_message_bytes, and inflight_requests metrics will be tracked. Enabling this option prevents the use of memory pools for parsing gRPC request bodies and may lead to more memory allocations. (default true)
242248
-server.http-conn-limit int
243249
Maximum number of simultaneous http connections, <=0 to disable
244250
-server.http-idle-timeout duration
@@ -273,20 +279,32 @@ Usage of ./pyroscope:
273279
Comma separated list of headers to exclude from loggin. Only used if server.log-request-headers is true.
274280
-server.log-source-ips-enabled
275281
Optionally log the source IPs.
282+
-server.log-source-ips-full
283+
Log all source IPs instead of only the originating one. Only used if server.log-source-ips-enabled is true
276284
-server.log-source-ips-header string
277285
Header field storing the source IPs. Only used if server.log-source-ips-enabled is true. If not set the default Forwarded, X-Real-IP and X-Forwarded-For headers are used
278286
-server.log-source-ips-regex string
279287
Regex for matching the source IPs. Only used if server.log-source-ips-enabled is true. If not set the default Forwarded, X-Real-IP and X-Forwarded-For headers are used
280288
-server.path-prefix string
281289
Base path to serve all API routes from (e.g. /v1/)
290+
-server.proxy-protocol-enabled
291+
Enables PROXY protocol.
282292
-server.register-instrumentation
283293
Register the intrumentation handlers (/metrics etc). (default true)
284294
-server.report-grpc-codes-in-instrumentation-label-enabled
285295
If set to true, gRPC statuses will be reported in instrumentation labels with their string representations. Otherwise, they will be reported as "error".
296+
-server.throughput.latency-cutoff duration
297+
Requests taking over the cutoff are be observed to measure throughput. Server-Timing header is used with specified unit as the indicator, for example 'Server-Timing: unit;val=8.2'. If set to 0, the throughput is not calculated.
298+
-server.throughput.unit string
299+
Unit of the server throughput metric, for example 'processed_bytes' or 'samples_processed'. Observed values are gathered from the 'Server-Timing' header with the 'val' key. If set, it is appended to the request_server_throughput metric name. (default "samples_processed")
286300
-server.tls-cipher-suites string
287301
Comma-separated list of cipher suites to use. If blank, the default Go cipher suites is used.
288302
-server.tls-min-version string
289303
Minimum TLS version to use. Allowed values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13. If blank, the Go TLS minimum version is used.
304+
-server.trace-request-headers
305+
Optionally add request headers to tracing spans.
306+
-server.trace-request-headers-exclude-list string
307+
Comma separated list of headers to exclude from tracing spans. Only used if server.trace-request-headers is true. The following headers are always excluded: Authorization, Cookie, X-Csrf-Token.
290308
-shutdown-delay duration
291309
Wait time before shutting down after a termination signal.
292310
-storage.azure.account-key string

0 commit comments

Comments
 (0)