Skip to content

Commit fd39d9e

Browse files
committed
place symbolizer flags registration under v2 umbrella
1 parent 3a6eb43 commit fd39d9e

4 files changed

Lines changed: 11 additions & 233 deletions

File tree

cmd/pyroscope/help-all.txt.tmpl

Lines changed: 0 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,146 +1059,6 @@ Usage of ./pyroscope:
10591059
True to enable zone-awareness and replicate blocks across different availability zones. This option needs be set both on the store-gateway and querier when running in microservices mode.
10601060
-store-gateway.tenant-shard-size int
10611061
The tenant's shard size, used when store-gateway sharding is enabled. Value of 0 disables shuffle sharding for the tenant, that is all tenant blocks are sharded across all store-gateway replicas.
1062-
-symbolizer.debuginfod-url string
1063-
URL of the debuginfod server (default "https://debuginfod.elfutils.org")
1064-
-symbolizer.enabled
1065-
Enable symbolization for unsymbolized profiles
1066-
-symbolizer.in-memory-debuginfo-cache-size int
1067-
Maximum size in bytes for the in-memory debug info cache (default 2147483648)
1068-
-symbolizer.in-memory-symbol-cache-size int
1069-
Maximum number of entries in the in-memory symbol cache (default 100000)
1070-
-symbolizer.persistent-debuginfo-store.enabled
1071-
Enable persistent debug info storage
1072-
-symbolizer.persistent-debuginfo-store.max-age duration
1073-
Maximum age of stored debug info (default 168h0m0s)
1074-
-symbolizer.persistent-debuginfo-store.storage.azure.account-key string
1075-
Azure storage account key. If unset, Azure managed identities will be used for authentication instead.
1076-
-symbolizer.persistent-debuginfo-store.storage.azure.account-name string
1077-
Azure storage account name
1078-
-symbolizer.persistent-debuginfo-store.storage.azure.connection-string string
1079-
If `connection-string` is set, the value of `endpoint-suffix` will not be used. Use this method over `account-key` if you need to authenticate via a SAS token. Or if you use the Azurite emulator.
1080-
-symbolizer.persistent-debuginfo-store.storage.azure.container-name string
1081-
Azure storage container name
1082-
-symbolizer.persistent-debuginfo-store.storage.azure.endpoint-suffix string
1083-
Azure storage endpoint suffix without schema. The account name will be prefixed to this value to create the FQDN. If set to empty string, default endpoint suffix is used.
1084-
-symbolizer.persistent-debuginfo-store.storage.azure.max-retries int
1085-
Number of retries for recoverable errors (default 3)
1086-
-symbolizer.persistent-debuginfo-store.storage.azure.user-assigned-id string
1087-
User assigned managed identity. If empty, then System assigned identity is used.
1088-
-symbolizer.persistent-debuginfo-store.storage.backend string
1089-
Backend storage to use. Supported backends are: s3, gcs, azure, swift, filesystem, cos.
1090-
-symbolizer.persistent-debuginfo-store.storage.cos.app-id string
1091-
COS app id
1092-
-symbolizer.persistent-debuginfo-store.storage.cos.bucket string
1093-
COS bucket name
1094-
-symbolizer.persistent-debuginfo-store.storage.cos.endpoint string
1095-
COS storage endpoint
1096-
-symbolizer.persistent-debuginfo-store.storage.cos.expect-continue-timeout duration
1097-
The time to wait for a server's first response headers after fully writing the request headers if the request has an Expect header. 0 to send the request body immediately. (default 1s)
1098-
-symbolizer.persistent-debuginfo-store.storage.cos.http.idle-conn-timeout duration
1099-
The time an idle connection will remain idle before closing. (default 1m30s)
1100-
-symbolizer.persistent-debuginfo-store.storage.cos.http.insecure-skip-verify
1101-
If the client connects to COS via HTTPS and this option is enabled, the client will accept any certificate and hostname.
1102-
-symbolizer.persistent-debuginfo-store.storage.cos.http.response-header-timeout duration
1103-
The amount of time the client will wait for a servers response headers. (default 2m0s)
1104-
-symbolizer.persistent-debuginfo-store.storage.cos.max-connections-per-host int
1105-
Maximum number of connections per host. 0 means no limit.
1106-
-symbolizer.persistent-debuginfo-store.storage.cos.max-idle-connections int
1107-
Maximum number of idle (keep-alive) connections across all hosts. 0 means no limit. (default 100)
1108-
-symbolizer.persistent-debuginfo-store.storage.cos.max-idle-connections-per-host int
1109-
Maximum number of idle (keep-alive) connections to keep per-host. If 0, a built-in default value is used. (default 100)
1110-
-symbolizer.persistent-debuginfo-store.storage.cos.region string
1111-
COS region name
1112-
-symbolizer.persistent-debuginfo-store.storage.cos.secret-id string
1113-
COS secret id
1114-
-symbolizer.persistent-debuginfo-store.storage.cos.secret-key string
1115-
COS secret key
1116-
-symbolizer.persistent-debuginfo-store.storage.cos.tls-handshake-timeout duration
1117-
Maximum time to wait for a TLS handshake. 0 means no limit. (default 10s)
1118-
-symbolizer.persistent-debuginfo-store.storage.filesystem.dir string
1119-
Local filesystem storage directory. (default "./data-shared")
1120-
-symbolizer.persistent-debuginfo-store.storage.gcs.bucket-name string
1121-
GCS bucket name
1122-
-symbolizer.persistent-debuginfo-store.storage.gcs.service-account string
1123-
JSON either from a Google Developers Console client_credentials.json file, or a Google Developers service account key. Needs to be valid JSON, not a filesystem path.
1124-
-symbolizer.persistent-debuginfo-store.storage.s3.access-key-id string
1125-
S3 access key ID
1126-
-symbolizer.persistent-debuginfo-store.storage.s3.bucket-lookup-type string
1127-
S3 bucket lookup style, use one of: [path-style virtual-hosted-style auto] (default "auto")
1128-
-symbolizer.persistent-debuginfo-store.storage.s3.bucket-name string
1129-
S3 bucket name
1130-
-symbolizer.persistent-debuginfo-store.storage.s3.endpoint string
1131-
The S3 bucket endpoint. It could be an AWS S3 endpoint listed at https://docs.aws.amazon.com/general/latest/gr/s3.html or the address of an S3-compatible service in hostname:port format.
1132-
-symbolizer.persistent-debuginfo-store.storage.s3.expect-continue-timeout duration
1133-
The time to wait for a server's first response headers after fully writing the request headers if the request has an Expect header. 0 to send the request body immediately. (default 1s)
1134-
-symbolizer.persistent-debuginfo-store.storage.s3.force-path-style
1135-
Deprecated, use s3.bucket-lookup-type instead. Set this to `true` to force the bucket lookup to be using path-style.
1136-
-symbolizer.persistent-debuginfo-store.storage.s3.http.idle-conn-timeout duration
1137-
The time an idle connection will remain idle before closing. (default 1m30s)
1138-
-symbolizer.persistent-debuginfo-store.storage.s3.http.insecure-skip-verify
1139-
If the client connects to S3 via HTTPS and this option is enabled, the client will accept any certificate and hostname.
1140-
-symbolizer.persistent-debuginfo-store.storage.s3.http.response-header-timeout duration
1141-
The amount of time the client will wait for a servers response headers. (default 2m0s)
1142-
-symbolizer.persistent-debuginfo-store.storage.s3.insecure
1143-
If enabled, use http:// for the S3 endpoint instead of https://. This could be useful in local dev/test environments while using an S3-compatible backend storage, like Minio.
1144-
-symbolizer.persistent-debuginfo-store.storage.s3.max-connections-per-host int
1145-
Maximum number of connections per host. 0 means no limit.
1146-
-symbolizer.persistent-debuginfo-store.storage.s3.max-idle-connections int
1147-
Maximum number of idle (keep-alive) connections across all hosts. 0 means no limit.
1148-
-symbolizer.persistent-debuginfo-store.storage.s3.max-idle-connections-per-host int
1149-
Maximum number of idle (keep-alive) connections to keep per-host. If 0, a built-in default value is used. (default 100)
1150-
-symbolizer.persistent-debuginfo-store.storage.s3.region string
1151-
S3 region. If unset, the client will issue a S3 GetBucketLocation API call to autodetect it.
1152-
-symbolizer.persistent-debuginfo-store.storage.s3.secret-access-key string
1153-
S3 secret access key
1154-
-symbolizer.persistent-debuginfo-store.storage.s3.signature-version string
1155-
The signature version to use for authenticating against S3. Supported values are: v4, v2. (default "v4")
1156-
-symbolizer.persistent-debuginfo-store.storage.s3.sse.kms-encryption-context string
1157-
KMS Encryption Context used for object encryption. It expects JSON formatted string.
1158-
-symbolizer.persistent-debuginfo-store.storage.s3.sse.kms-key-id string
1159-
KMS Key ID used to encrypt objects in S3
1160-
-symbolizer.persistent-debuginfo-store.storage.s3.sse.type string
1161-
Enable AWS Server Side Encryption. Supported values: SSE-KMS, SSE-S3.
1162-
-symbolizer.persistent-debuginfo-store.storage.s3.tls-handshake-timeout duration
1163-
Maximum time to wait for a TLS handshake. 0 means no limit. (default 10s)
1164-
-symbolizer.persistent-debuginfo-store.storage.storage-prefix string
1165-
[experimental] Prefix for all objects stored in the backend storage. For simplicity, it may only contain digits and English alphabet letters.
1166-
-symbolizer.persistent-debuginfo-store.storage.swift.auth-url string
1167-
OpenStack Swift authentication URL
1168-
-symbolizer.persistent-debuginfo-store.storage.swift.auth-version int
1169-
OpenStack Swift authentication API version. 0 to autodetect.
1170-
-symbolizer.persistent-debuginfo-store.storage.swift.connect-timeout duration
1171-
Time after which a connection attempt is aborted. (default 10s)
1172-
-symbolizer.persistent-debuginfo-store.storage.swift.container-name string
1173-
Name of the OpenStack Swift container to put chunks in.
1174-
-symbolizer.persistent-debuginfo-store.storage.swift.domain-id string
1175-
OpenStack Swift user's domain ID.
1176-
-symbolizer.persistent-debuginfo-store.storage.swift.domain-name string
1177-
OpenStack Swift user's domain name.
1178-
-symbolizer.persistent-debuginfo-store.storage.swift.max-retries int
1179-
Max retries on requests error. (default 3)
1180-
-symbolizer.persistent-debuginfo-store.storage.swift.password string
1181-
OpenStack Swift API key.
1182-
-symbolizer.persistent-debuginfo-store.storage.swift.project-domain-id string
1183-
ID of the OpenStack Swift project's domain (v3 auth only), only needed if it differs the from user domain.
1184-
-symbolizer.persistent-debuginfo-store.storage.swift.project-domain-name string
1185-
Name of the OpenStack Swift project's domain (v3 auth only), only needed if it differs from the user domain.
1186-
-symbolizer.persistent-debuginfo-store.storage.swift.project-id string
1187-
OpenStack Swift project ID (v2,v3 auth only).
1188-
-symbolizer.persistent-debuginfo-store.storage.swift.project-name string
1189-
OpenStack Swift project name (v2,v3 auth only).
1190-
-symbolizer.persistent-debuginfo-store.storage.swift.region-name string
1191-
OpenStack Swift Region to use (v2,v3 auth only).
1192-
-symbolizer.persistent-debuginfo-store.storage.swift.request-timeout duration
1193-
Time after which an idle request is aborted. The timeout watchdog is reset each time some data is received, so the timeout triggers after X time no data is received on a request. (default 5s)
1194-
-symbolizer.persistent-debuginfo-store.storage.swift.user-domain-id string
1195-
OpenStack Swift user's domain ID.
1196-
-symbolizer.persistent-debuginfo-store.storage.swift.user-domain-name string
1197-
OpenStack Swift user's domain name.
1198-
-symbolizer.persistent-debuginfo-store.storage.swift.user-id string
1199-
OpenStack Swift user ID.
1200-
-symbolizer.persistent-debuginfo-store.storage.swift.username string
1201-
OpenStack Swift username.
12021062
-target comma-separated-list-of-strings
12031063
Comma-separated list of Pyroscope modules to load. The alias 'all' can be used in the list to load a number of core modules and will enable single-binary mode. (default all)
12041064
-tenant-settings.collection-rules.alloy-template-path string

cmd/pyroscope/help.txt.tmpl

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -385,94 +385,6 @@ Usage of ./pyroscope:
385385
True to enable zone-awareness and replicate blocks across different availability zones. This option needs be set both on the store-gateway and querier when running in microservices mode.
386386
-store-gateway.tenant-shard-size int
387387
The tenant's shard size, used when store-gateway sharding is enabled. Value of 0 disables shuffle sharding for the tenant, that is all tenant blocks are sharded across all store-gateway replicas.
388-
-symbolizer.debuginfod-url string
389-
URL of the debuginfod server (default "https://debuginfod.elfutils.org")
390-
-symbolizer.enabled
391-
Enable symbolization for unsymbolized profiles
392-
-symbolizer.in-memory-debuginfo-cache-size int
393-
Maximum size in bytes for the in-memory debug info cache (default 2147483648)
394-
-symbolizer.in-memory-symbol-cache-size int
395-
Maximum number of entries in the in-memory symbol cache (default 100000)
396-
-symbolizer.persistent-debuginfo-store.enabled
397-
Enable persistent debug info storage
398-
-symbolizer.persistent-debuginfo-store.max-age duration
399-
Maximum age of stored debug info (default 168h0m0s)
400-
-symbolizer.persistent-debuginfo-store.storage.azure.account-key string
401-
Azure storage account key. If unset, Azure managed identities will be used for authentication instead.
402-
-symbolizer.persistent-debuginfo-store.storage.azure.account-name string
403-
Azure storage account name
404-
-symbolizer.persistent-debuginfo-store.storage.azure.connection-string string
405-
If `connection-string` is set, the value of `endpoint-suffix` will not be used. Use this method over `account-key` if you need to authenticate via a SAS token. Or if you use the Azurite emulator.
406-
-symbolizer.persistent-debuginfo-store.storage.azure.container-name string
407-
Azure storage container name
408-
-symbolizer.persistent-debuginfo-store.storage.azure.endpoint-suffix string
409-
Azure storage endpoint suffix without schema. The account name will be prefixed to this value to create the FQDN. If set to empty string, default endpoint suffix is used.
410-
-symbolizer.persistent-debuginfo-store.storage.backend string
411-
Backend storage to use. Supported backends are: s3, gcs, azure, swift, filesystem, cos.
412-
-symbolizer.persistent-debuginfo-store.storage.cos.app-id string
413-
COS app id
414-
-symbolizer.persistent-debuginfo-store.storage.cos.bucket string
415-
COS bucket name
416-
-symbolizer.persistent-debuginfo-store.storage.cos.endpoint string
417-
COS storage endpoint
418-
-symbolizer.persistent-debuginfo-store.storage.cos.region string
419-
COS region name
420-
-symbolizer.persistent-debuginfo-store.storage.cos.secret-id string
421-
COS secret id
422-
-symbolizer.persistent-debuginfo-store.storage.cos.secret-key string
423-
COS secret key
424-
-symbolizer.persistent-debuginfo-store.storage.filesystem.dir string
425-
Local filesystem storage directory. (default "./data-shared")
426-
-symbolizer.persistent-debuginfo-store.storage.gcs.bucket-name string
427-
GCS bucket name
428-
-symbolizer.persistent-debuginfo-store.storage.gcs.service-account string
429-
JSON either from a Google Developers Console client_credentials.json file, or a Google Developers service account key. Needs to be valid JSON, not a filesystem path.
430-
-symbolizer.persistent-debuginfo-store.storage.s3.access-key-id string
431-
S3 access key ID
432-
-symbolizer.persistent-debuginfo-store.storage.s3.bucket-name string
433-
S3 bucket name
434-
-symbolizer.persistent-debuginfo-store.storage.s3.endpoint string
435-
The S3 bucket endpoint. It could be an AWS S3 endpoint listed at https://docs.aws.amazon.com/general/latest/gr/s3.html or the address of an S3-compatible service in hostname:port format.
436-
-symbolizer.persistent-debuginfo-store.storage.s3.region string
437-
S3 region. If unset, the client will issue a S3 GetBucketLocation API call to autodetect it.
438-
-symbolizer.persistent-debuginfo-store.storage.s3.secret-access-key string
439-
S3 secret access key
440-
-symbolizer.persistent-debuginfo-store.storage.s3.sse.kms-encryption-context string
441-
KMS Encryption Context used for object encryption. It expects JSON formatted string.
442-
-symbolizer.persistent-debuginfo-store.storage.s3.sse.kms-key-id string
443-
KMS Key ID used to encrypt objects in S3
444-
-symbolizer.persistent-debuginfo-store.storage.s3.sse.type string
445-
Enable AWS Server Side Encryption. Supported values: SSE-KMS, SSE-S3.
446-
-symbolizer.persistent-debuginfo-store.storage.swift.auth-url string
447-
OpenStack Swift authentication URL
448-
-symbolizer.persistent-debuginfo-store.storage.swift.auth-version int
449-
OpenStack Swift authentication API version. 0 to autodetect.
450-
-symbolizer.persistent-debuginfo-store.storage.swift.container-name string
451-
Name of the OpenStack Swift container to put chunks in.
452-
-symbolizer.persistent-debuginfo-store.storage.swift.domain-id string
453-
OpenStack Swift user's domain ID.
454-
-symbolizer.persistent-debuginfo-store.storage.swift.domain-name string
455-
OpenStack Swift user's domain name.
456-
-symbolizer.persistent-debuginfo-store.storage.swift.password string
457-
OpenStack Swift API key.
458-
-symbolizer.persistent-debuginfo-store.storage.swift.project-domain-id string
459-
ID of the OpenStack Swift project's domain (v3 auth only), only needed if it differs the from user domain.
460-
-symbolizer.persistent-debuginfo-store.storage.swift.project-domain-name string
461-
Name of the OpenStack Swift project's domain (v3 auth only), only needed if it differs from the user domain.
462-
-symbolizer.persistent-debuginfo-store.storage.swift.project-id string
463-
OpenStack Swift project ID (v2,v3 auth only).
464-
-symbolizer.persistent-debuginfo-store.storage.swift.project-name string
465-
OpenStack Swift project name (v2,v3 auth only).
466-
-symbolizer.persistent-debuginfo-store.storage.swift.region-name string
467-
OpenStack Swift Region to use (v2,v3 auth only).
468-
-symbolizer.persistent-debuginfo-store.storage.swift.user-domain-id string
469-
OpenStack Swift user's domain ID.
470-
-symbolizer.persistent-debuginfo-store.storage.swift.user-domain-name string
471-
OpenStack Swift user's domain name.
472-
-symbolizer.persistent-debuginfo-store.storage.swift.user-id string
473-
OpenStack Swift user ID.
474-
-symbolizer.persistent-debuginfo-store.storage.swift.username string
475-
OpenStack Swift username.
476388
-target comma-separated-list-of-strings
477389
Comma-separated list of Pyroscope modules to load. The alias 'all' can be used in the list to load a number of core modules and will enable single-binary mode. (default all)
478390
-tracing.enabled

pkg/experiment/symbolizer/symbolizer.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ import (
1111
"io"
1212
"time"
1313

14+
"github.com/dgraph-io/ristretto"
1415
"github.com/go-kit/log"
1516
"github.com/go-kit/log/level"
16-
17-
"github.com/dgraph-io/ristretto"
1817
pprof "github.com/google/pprof/profile"
1918
lru "github.com/hashicorp/golang-lru/v2"
2019
"github.com/prometheus/client_golang/prometheus"
2120

2221
googlev1 "github.com/grafana/pyroscope/api/gen/proto/go/google/v1"
2322
objstoreclient "github.com/grafana/pyroscope/pkg/objstore/client"
24-
"github.com/grafana/pyroscope/pkg/util"
23+
phlarecontext "github.com/grafana/pyroscope/pkg/phlare/context"
2524
)
2625

2726
const (
@@ -512,7 +511,10 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
512511

513512
func (cfg *Config) RegisterFlagsWithContext(ctx context.Context, f *flag.FlagSet) {
514513
cfg.RegisterFlags(f)
515-
cfg.PersistentDebugInfoStore.Storage.RegisterFlagsWithPrefix("symbolizer.persistent-debuginfo-store.storage.", f, util.Logger)
514+
// Only register storage flags if they're needed
515+
if cfg.PersistentDebugInfoStore.Enabled {
516+
cfg.PersistentDebugInfoStore.Storage.RegisterFlagsWithPrefix("symbolizer.persistent-debuginfo-store.storage.", f, phlarecontext.Logger(ctx))
517+
}
516518
}
517519

518520
type DwarfResolver struct {

pkg/phlare/phlare.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ func (c *Config) RegisterFlagsWithContext(ctx context.Context, f *flag.FlagSet)
201201
c.API.RegisterFlags(f)
202202
c.EmbeddedGrafana.RegisterFlags(f)
203203
c.TenantSettings.RegisterFlags(f)
204-
c.Symbolizer.RegisterFlagsWithContext(ctx, f)
204+
205+
c.v2Experiment = os.Getenv("PYROSCOPE_V2_EXPERIMENT") != ""
206+
if c.v2Experiment {
207+
c.Symbolizer.RegisterFlagsWithContext(ctx, f)
208+
}
205209
}
206210

207211
// registerServerFlagsWithChangedDefaultValues registers *Config.Server flags, but overrides some defaults set by the dskit package.

0 commit comments

Comments
 (0)