Skip to content

Commit 24d3f1a

Browse files
petewallclaude
andauthored
fix: use glob syntax instead of regex in Beyla discovery config (#2485)
* fix: use glob syntax instead of regex in Beyla discovery config Beyla interprets discovery fields as glob patterns, not regex. The default config used "." (regex any-char) instead of "*" (glob wildcard) for k8s_namespace, and regex alternation "|" instead of glob brace alternation for exe_path exclusions. This caused Beyla to discover zero services and silently skip exclusions. Fixes #2484 Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix: regenerate all rendered outputs with corrected Beyla glob patterns Co-Authored-By: Claude Opus 4.6 <[email protected]> * Fix unit test snapshot Signed-off-by: Pete Wall <[email protected]> * change services to instrument Signed-off-by: Pete Wall <[email protected]> --------- Signed-off-by: Pete Wall <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
1 parent 881025c commit 24d3f1a

13 files changed

Lines changed: 39 additions & 39 deletions

File tree

charts/k8s-monitoring/charts/feature-auto-instrumentation/templates/_beyla-config.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
{{- $overrides = merge $overrides (dict "network" (dict "enable" true)) }}
2323
{{- end }}
2424
{{- if and (eq (dig "preset" "" $beylaMap) "application") (not (hasKey $config "discovery")) }}
25-
{{- $services := list (dict "k8s_namespace" ".") }}
26-
{{- $excludeServices := list (dict "exe_path" ".*alloy.*|.*otelcol.*|.*beyla.*") }}
25+
{{- $services := list (dict "k8s_namespace" "*") }}
26+
{{- $excludeServices := list (dict "exe_path" "{*alloy*,*otelcol*,*beyla*}") }}
2727
{{- $discovery := dict "instrument" $services "exclude_instrument" $excludeServices }}
2828
{{- $overrides = merge $overrides (dict "discovery" $discovery) }}
2929
{{- end }}

charts/k8s-monitoring/docs/examples/exclude-by-namespace/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ autoInstrumentation:
7474
config:
7575
data:
7676
discovery:
77-
services:
78-
- k8s_namespace: .
77+
instrument:
78+
- k8s_namespace: "*"
7979
exclude_services:
8080
- k8s_namespace: kube-system
8181
- k8s_namespace: kube-public

charts/k8s-monitoring/docs/examples/exclude-by-namespace/output.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/exclude-by-namespace/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ autoInstrumentation:
6161
config:
6262
data:
6363
discovery:
64-
services:
65-
- k8s_namespace: .
64+
instrument:
65+
- k8s_namespace: "*"
6666
exclude_services:
6767
- k8s_namespace: kube-system
6868
- k8s_namespace: kube-public

charts/k8s-monitoring/docs/examples/features/auto-instrumentation/beyla-metrics/output.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/features/auto-instrumentation/span-metrics-only/output.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/images/images-by-digest/output.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/private-image-registries/individual/output.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/resource-requests-and-limits/output.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/k8s-monitoring/docs/examples/tolerations/output.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)