fix: use glob syntax instead of regex in Beyla discovery config#2485
fix: use glob syntax instead of regex in Beyla discovery config#2485
Conversation
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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
TruffleHog Scan Results Summary: Found 7 potential secrets (0 verified, 7 unverified)
Review: Check if unverified secrets are false positives. Ignoring False Positives: This works for files that support line numbers (most source files). After adding the comment, push your changes and the scan will re-run. |
Signed-off-by: Pete Wall <pete.wall@grafana.com>
There was a problem hiding this comment.
Pull request overview
Fixes Beyla discovery defaults in the Helm chart by using glob syntax (as Beyla expects) instead of regex syntax, restoring service discovery and exclusion behavior.
Changes:
- Update default
k8s_namespacematch-all from.(regex) to*(glob) in generated Beyla config. - Update default
exe_pathexclusion from regex alternation to glob brace alternation. - Regenerate affected rendered outputs / snapshots and update the exclude-by-namespace example to use the corrected glob.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| charts/k8s-monitoring/charts/feature-auto-instrumentation/templates/_beyla-config.tpl | Fixes the default Beyla discovery config to use glob patterns (*, {...}) instead of regex syntax. |
| charts/k8s-monitoring/tests/feature_beyla_config_test.yaml | Updates test expectations to match corrected rendered discovery defaults. |
| charts/k8s-monitoring/tests/platform/openshift/.rendered/output.yaml | Updates rendered snapshot with corrected glob patterns and checksum. |
| charts/k8s-monitoring/tests/platform/grafana-cloud/k8s-monitoring/.rendered/output.yaml | Updates rendered snapshot with corrected glob patterns and checksum. |
| charts/k8s-monitoring/docs/examples/tolerations/output.yaml | Updates example rendered output to reflect corrected discovery defaults. |
| charts/k8s-monitoring/docs/examples/resource-requests-and-limits/output.yaml | Updates example rendered output to reflect corrected discovery defaults. |
| charts/k8s-monitoring/docs/examples/private-image-registries/individual/output.yaml | Updates example rendered output to reflect corrected discovery defaults. |
| charts/k8s-monitoring/docs/examples/images/images-by-digest/output.yaml | Updates example rendered output to reflect corrected discovery defaults. |
| charts/k8s-monitoring/docs/examples/features/auto-instrumentation/span-metrics-only/output.yaml | Updates example rendered output to reflect corrected discovery defaults. |
| charts/k8s-monitoring/docs/examples/features/auto-instrumentation/beyla-metrics/output.yaml | Updates example rendered output to reflect corrected discovery defaults. |
| charts/k8s-monitoring/docs/examples/exclude-by-namespace/values.yaml | Fixes the example values to use k8s_namespace: "*" (glob match-all). |
| charts/k8s-monitoring/docs/examples/exclude-by-namespace/README.md | Fixes the example documentation to use k8s_namespace: "*" (glob match-all). |
| charts/k8s-monitoring/docs/examples/exclude-by-namespace/output.yaml | Updates example rendered output to reflect the corrected glob pattern and checksum. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mariomac
left a comment
There was a problem hiding this comment.
Correct to me! just a couple of corrections in docs/examples/exclude-by-namespace
Signed-off-by: Pete Wall <pete.wall@grafana.com>
|
@mariomac , updated |
* 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 <noreply@anthropic.com> * fix: regenerate all rendered outputs with corrected Beyla glob patterns Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix unit test snapshot Signed-off-by: Pete Wall <pete.wall@grafana.com> * change services to instrument Signed-off-by: Pete Wall <pete.wall@grafana.com> --------- Signed-off-by: Pete Wall <pete.wall@grafana.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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