Skip to content

Commit

Permalink
Remove hidden/deprecated configuration values (#1570)
Browse files Browse the repository at this point in the history
* Remove hidden/deprecated values

* update configuration in integration tests to restore non-default removed env vars

* fix include attribute values
mariomac authored Jan 24, 2025
1 parent cda3539 commit ad84610
Showing 60 changed files with 73 additions and 146 deletions.
6 changes: 0 additions & 6 deletions pkg/components/beyla.go
Original file line number Diff line number Diff line change
@@ -192,12 +192,6 @@ func attributeGroups(config *beyla.Config, ctxInfo *global.ContextInfo) {
if config.Routes != nil {
ctxInfo.MetricAttributeGroups.Add(attributes.GroupHTTPRoutes)
}
if config.Metrics.ReportPeerInfo || config.Prometheus.ReportPeerInfo {
ctxInfo.MetricAttributeGroups.Add(attributes.GroupPeerInfo)
}
if config.Metrics.ReportTarget || config.Prometheus.ReportTarget {
ctxInfo.MetricAttributeGroups.Add(attributes.GroupTarget)
}
if config.NetworkFlows.Deduper == flow.DeduperNone {
ctxInfo.MetricAttributeGroups.Add(attributes.GroupNetIfaceDirection)
}
17 changes: 2 additions & 15 deletions pkg/export/attributes/attr_defs.go
Original file line number Diff line number Diff line change
@@ -17,8 +17,6 @@ const (
GroupHTTPRoutes
GroupNetIfaceDirection
GroupNetCIDR
GroupPeerInfo // TODO Beyla 2.0: remove when we remove ReportPeerInfo configuration option
GroupTarget // TODO Beyla 2.0: remove when we remove ReportTarget configuration option
GroupTraces
)

@@ -36,7 +34,6 @@ func getDefinitions(groups AttrGroups) map[Section]AttrReportGroup {
kubeEnabled := groups.Has(GroupKubernetes)
promEnabled := groups.Has(GroupPrometheus)
ifaceDirEnabled := groups.Has(GroupNetIfaceDirection)
peerInfoEnabled := groups.Has(GroupPeerInfo)
cidrEnabled := groups.Has(GroupNetCIDR)

// attributes to be reported exclusively for prometheus exporters
@@ -121,7 +118,7 @@ func getDefinitions(groups AttrGroups) map[Section]AttrReportGroup {

var serverInfo = AttrReportGroup{
Attributes: map[attr.Name]Default{
attr.ClientAddr: Default(peerInfoEnabled),
attr.ClientAddr: false,
attr.ServerAddr: true,
attr.ServerPort: true,
},
@@ -138,18 +135,8 @@ func getDefinitions(groups AttrGroups) map[Section]AttrReportGroup {
},
}

// TODO Beyla 2.0 remove
// this just defaults the path as default when the target report is enabled
// via the deprecated BEYLA_METRICS_REPORT_TARGET config option
var deprecatedHTTPPath = AttrReportGroup{
Disabled: !groups.Has(GroupTarget),
Attributes: map[attr.Name]Default{
attr.HTTPUrlPath: true,
},
}

var httpCommon = AttrReportGroup{
SubGroups: []*AttrReportGroup{&httpRoutes, &deprecatedHTTPPath},
SubGroups: []*AttrReportGroup{&httpRoutes},
Attributes: map[attr.Name]Default{
attr.HTTPRequestMethod: true,
attr.HTTPResponseStatusCode: true,
8 changes: 0 additions & 8 deletions pkg/export/otel/metrics.go
Original file line number Diff line number Diff line change
@@ -78,14 +78,6 @@ type MetricsConfig struct {
// InsecureSkipVerify is not standard, so we don't follow the same naming convention
InsecureSkipVerify bool `yaml:"insecure_skip_verify" env:"BEYLA_OTEL_INSECURE_SKIP_VERIFY"`

// ReportTarget specifies whether http.target should be submitted as a metric attribute. It is disabled by
// default to avoid cardinality explosion in paths with IDs. In that case, it is recommended to group these
// requests in the Routes node
// Deprecated. Going to be removed in Beyla 2.0. Use attributes.select instead
ReportTarget bool `yaml:"report_target" env:"BEYLA_METRICS_REPORT_TARGET"`
// Deprecated. Going to be removed in Beyla 2.0. Use attributes.select instead
ReportPeerInfo bool `yaml:"report_peer" env:"BEYLA_METRICS_REPORT_PEER"`

Buckets Buckets `yaml:"buckets"`
HistogramAggregation string `yaml:"histogram_aggregation" env:"OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION"`

5 changes: 0 additions & 5 deletions pkg/export/prom/prom.go
Original file line number Diff line number Diff line change
@@ -97,11 +97,6 @@ type PrometheusConfig struct {
Port int `yaml:"port" env:"BEYLA_PROMETHEUS_PORT"`
Path string `yaml:"path" env:"BEYLA_PROMETHEUS_PATH"`

// Deprecated. Going to be removed in Beyla 2.0. Use attributes.select instead
ReportTarget bool `yaml:"report_target" env:"BEYLA_METRICS_REPORT_TARGET"`
// Deprecated. Going to be removed in Beyla 2.0. Use attributes.select instead
ReportPeerInfo bool `yaml:"report_peer" env:"BEYLA_METRICS_REPORT_PEER"`

DisableBuildInfo bool `yaml:"disable_build_info" env:"BEYLA_PROMETHEUS_DISABLE_BUILD_INFO"`

// Features of metrics that are can be exported. Accepted values are "application" and "network".
6 changes: 5 additions & 1 deletion test/integration/configs/instrumenter-config-elixir.yml
Original file line number Diff line number Diff line change
@@ -3,4 +3,8 @@ routes:
- /test/:test_id
unmatched: path
otel_metrics_export:
endpoint: http://otelcol:4318
endpoint: http://otelcol:4318
attributes:
select:
"*":
include: ["*"]
Original file line number Diff line number Diff line change
@@ -9,4 +9,7 @@ otel_traces_export:
endpoint: http://jaeger:4318
attributes:
kubernetes:
cluster_name: beyla
cluster_name: beyla
select:
"*":
include: ["*"]
5 changes: 4 additions & 1 deletion test/integration/configs/instrumenter-config-go-otel.yml
Original file line number Diff line number Diff line change
@@ -6,4 +6,7 @@ otel_traces_export:
endpoint: http://jaeger:4318
attributes:
kubernetes:
cluster_name: beyla
cluster_name: beyla
select:
"*":
include: ["*"]
4 changes: 4 additions & 0 deletions test/integration/configs/instrumenter-config-grpc-export.yml
Original file line number Diff line number Diff line change
@@ -11,3 +11,7 @@ otel_metrics_export:
otel_traces_export:
endpoint: http://jaeger:4317
protocol: grpc
attributes:
select:
"*":
include: ["*"]
Original file line number Diff line number Diff line change
@@ -11,4 +11,8 @@ discovery:
services:
- namespace: grpc-http2-go
name: server
exe_path: testserver
exe_path: testserver
attributes:
select:
"*":
include: ["*"]
6 changes: 5 additions & 1 deletion test/integration/configs/instrumenter-config-http2.yml
Original file line number Diff line number Diff line change
@@ -14,4 +14,8 @@ discovery:
exe_path: http2client
- namespace: http2-go
name: server
exe_path: http2srv
exe_path: http2srv
attributes:
select:
"*":
include: ["*"]
4 changes: 4 additions & 0 deletions test/integration/configs/instrumenter-config-java-host.yml
Original file line number Diff line number Diff line change
@@ -4,3 +4,7 @@ routes:
unmatched: path
otel_metrics_export:
endpoint: http://127.0.0.1:4318
attributes:
select:
"*":
include: ["*"]
2 changes: 2 additions & 0 deletions test/integration/configs/instrumenter-config-java.yml
Original file line number Diff line number Diff line change
@@ -10,3 +10,5 @@ attributes:
include: ["*"]
process_cpu_*:
exclude: ["cpu_mode"]
"*":
include: ["*"]
Original file line number Diff line number Diff line change
@@ -51,3 +51,5 @@ attributes:
select:
http_server_request_duration_seconds_count:
exclude: ["server_address"]
"*":
include: ["*"]
2 changes: 2 additions & 0 deletions test/integration/configs/instrumenter-config-multiexec.yml
Original file line number Diff line number Diff line change
@@ -51,3 +51,5 @@ attributes:
select:
http_server_request_duration_seconds_count:
exclude: ["server_address"]
"*":
include: ["*"]
4 changes: 4 additions & 0 deletions test/integration/configs/instrumenter-config-no-route.yml
Original file line number Diff line number Diff line change
@@ -6,3 +6,7 @@ otel_metrics_export:
endpoint: http://otelcol:4318
otel_traces_export:
endpoint: http://jaeger:4318
attributes:
select:
"*":
include: ["*"]
6 changes: 5 additions & 1 deletion test/integration/configs/instrumenter-config-node.yml
Original file line number Diff line number Diff line change
@@ -5,4 +5,8 @@ routes:
otel_metrics_export:
endpoint: http://otelcol:4318
otel_traces_export:
endpoint: http://jaeger:4318
endpoint: http://jaeger:4318
attributes:
select:
"*":
include: ["*"]
4 changes: 4 additions & 0 deletions test/integration/configs/instrumenter-config-other-grpc.yml
Original file line number Diff line number Diff line change
@@ -17,3 +17,7 @@ otel_metrics_export:
endpoint: http://otelcol:4318
otel_traces_export:
endpoint: http://jaeger:4318
attributes:
select:
"*":
include: ["*"]
Original file line number Diff line number Diff line change
@@ -6,4 +6,8 @@ routes:
otel_metrics_export:
endpoint: http://otelcol:4318
otel_traces_export:
endpoint: http://jaeger:4318
endpoint: http://jaeger:4318
attributes:
select:
"*":
include: ["*"]
6 changes: 5 additions & 1 deletion test/integration/configs/instrumenter-config-php.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
otel_metrics_export:
endpoint: http://127.0.0.1:4018
otel_traces_export:
endpoint: http://127.0.0.1:4318
endpoint: http://127.0.0.1:4318
attributes:
select:
"*":
include: ["*"]
2 changes: 2 additions & 0 deletions test/integration/configs/instrumenter-config-promscrape.yml
Original file line number Diff line number Diff line change
@@ -23,5 +23,7 @@ attributes:
include: ["*"]
process_network_io:
include: ["*"]
"*":
include: ["*"]
kubernetes:
cluster_name: beyla
6 changes: 5 additions & 1 deletion test/integration/configs/instrumenter-config-ruby.yml
Original file line number Diff line number Diff line change
@@ -3,4 +3,8 @@ routes:
- /users/:user_id
unmatched: path
otel_metrics_export:
endpoint: http://otelcol:4318
endpoint: http://otelcol:4318
attributes:
select:
"*":
include: ["*"]
5 changes: 4 additions & 1 deletion test/integration/configs/instrumenter-config.yml
Original file line number Diff line number Diff line change
@@ -13,4 +13,7 @@ attributes:
kubernetes:
cluster_name: beyla
resource_labels:
deployment.environment: ["deployment.environment"]
deployment.environment: ["deployment.environment"]
select:
"*":
include: ["*"]
2 changes: 0 additions & 2 deletions test/integration/docker-compose-1.16.yml
Original file line number Diff line number Diff line change
@@ -36,8 +36,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_INTERNAL_METRICS_PROMETHEUS_PORT: 8999
BEYLA_HOSTNAME: "beyla"
ports:
2 changes: 0 additions & 2 deletions test/integration/docker-compose-1.17.yml
Original file line number Diff line number Diff line change
@@ -41,8 +41,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_INTERNAL_METRICS_PROMETHEUS_PORT: 8999
BEYLA_HOSTNAME: "beyla"
ports:
2 changes: 0 additions & 2 deletions test/integration/docker-compose-client.yml
Original file line number Diff line number Diff line change
@@ -35,8 +35,6 @@ services:
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_ENFORCE_SYS_CAPS: "false"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_INTERNAL_METRICS_PROMETHEUS_PORT: 8999
BEYLA_PROCESSES_INTERVAL: "100ms"
BEYLA_HOSTNAME: "beyla"
2 changes: 0 additions & 2 deletions test/integration/docker-compose-dotnet.yml
Original file line number Diff line number Diff line change
@@ -41,8 +41,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "100ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
depends_on:
testserver:
2 changes: 0 additions & 2 deletions test/integration/docker-compose-elixir.yml
Original file line number Diff line number Diff line change
@@ -37,8 +37,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
depends_on:
testserver:
2 changes: 0 additions & 2 deletions test/integration/docker-compose-go-otel-grpc.yml
Original file line number Diff line number Diff line change
@@ -40,8 +40,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_PROCESSES_INTERVAL: "100ms"
BEYLA_HOSTNAME: "beyla"
BEYLA_EXCLUDE_OTEL_INSTRUMENTED_SERVICES: "${BEYLA_EXCLUDE_OTEL_INSTRUMENTED_SERVICES}"
2 changes: 0 additions & 2 deletions test/integration/docker-compose-go-otel.yml
Original file line number Diff line number Diff line change
@@ -40,8 +40,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_INTERNAL_METRICS_PROMETHEUS_PORT: 8999
BEYLA_PROCESSES_INTERVAL: "100ms"
BEYLA_HOSTNAME: "beyla"
2 changes: 0 additions & 2 deletions test/integration/docker-compose-grpc-http2-mux.yml
Original file line number Diff line number Diff line change
@@ -46,8 +46,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
depends_on:
testclient:
2 changes: 0 additions & 2 deletions test/integration/docker-compose-http2.yml
Original file line number Diff line number Diff line change
@@ -46,8 +46,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
depends_on:
testclient:
2 changes: 0 additions & 2 deletions test/integration/docker-compose-java-host.yml
Original file line number Diff line number Diff line change
@@ -34,8 +34,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
ports:
- "8999:8999" # Prometheus scrape port, if enabled via config
2 changes: 0 additions & 2 deletions test/integration/docker-compose-java-pid.yml
Original file line number Diff line number Diff line change
@@ -34,8 +34,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
BEYLA_BPF_HIGH_REQUEST_VOLUME: "true"
depends_on:
2 changes: 0 additions & 2 deletions test/integration/docker-compose-java-system-wide.yml
Original file line number Diff line number Diff line change
@@ -46,8 +46,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
#BEYLA_TRACES_REPORT_CACHE_LEN: 1 # bad setting, used for testing only
#BEYLA_METRICS_REPORT_CACHE_LEN: 1 # bad setting, used for testing only
2 changes: 0 additions & 2 deletions test/integration/docker-compose-java.yml
Original file line number Diff line number Diff line change
@@ -38,8 +38,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "DEBUG"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
depends_on:
testserver:
2 changes: 0 additions & 2 deletions test/integration/docker-compose-multiexec-host.yml
Original file line number Diff line number Diff line change
@@ -138,8 +138,6 @@ services:
BEYLA_BPF_BATCH_TIMEOUT: "10ms"
BEYLA_LOG_LEVEL: "INFO"
BEYLA_BPF_DEBUG: "TRUE"
BEYLA_METRICS_REPORT_TARGET: "true"
BEYLA_METRICS_REPORT_PEER: "true"
BEYLA_HOSTNAME: "beyla"
BEYLA_INTERNAL_METRICS_PROMETHEUS_PORT: 8999
BEYLA_INTERNAL_METRICS_PROMETHEUS_PATH: /metrics
Loading

0 comments on commit ad84610

Please sign in to comment.