Skip to content

Upgrade Beyla component to 2.7.7#4891

Merged
dehaansa merged 3 commits intomainfrom
upgrade_beyla_2.7.7
Nov 20, 2025
Merged

Upgrade Beyla component to 2.7.7#4891
dehaansa merged 3 commits intomainfrom
upgrade_beyla_2.7.7

Conversation

@grcevski
Copy link
Contributor

@grcevski grcevski commented Nov 20, 2025

PR Description

This PR upgrades the Beyla component to add two fixes:

  • Beyla component overrides accidentally the telemetry.sdk.name to always be Beyla for all spans
  • Beyla now parses OTEL_RESOURCE_ATTRIBUTES correctly and allows users to choose which ones to include on span metrics.

Which issue(s) this PR fixes

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@grcevski grcevski requested review from a team as code owners November 20, 2025 01:32
@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

🔍 Dependency Review

github.com/grafana/beyla/v2 v2.7.6 → v2.7.8 — ⚠️ Needs Review

Reasoning:

  • Patch-level upgrade, but introduces new optional configuration that affects metric label sets and defaults. Code changes are advisable to expose/configure these options and keep docs/tests in sync.

What changed between 2.7.6 and 2.7.8:

  • New Prometheus metrics configuration options:
    • extra_resource_labels (target_info)
    • extra_span_resource_labels (span metrics), with a non-empty default set:
      • k8s.cluster.name
      • k8s.namespace.name
      • service.version
      • deployment.environment
  • Behavior: default span metrics now include those resource labels when present in OTEL_RESOURCE_ATTRIBUTES, increasing label cardinality.

Evidence (from this PR’s docs and changelog):

  • CHANGELOG: “Update Beyla component to 2.7.8.”
  • Docs updated to include new options and defaults:
    extra_resource_labels: List of OTEL resource labels to include on target_info.
    extra_span_resource_labels: List of OTEL resource labels to include on span metrics.
    Default: ["k8s.cluster.name", "k8s.namespace.name", "service.version", "deployment.environment"]
    

Code updates required (and already included in this PR):

  • Add the new fields to the component config schema and pass-through to Beyla’s Prometheus config.
  • Adjust tests to reflect new defaults.

Minimal code diffs to adopt 2.7.8 and surface new options:

  • Schema additions:
--- a/internal/component/beyla/ebpf/args.go
+++ b/internal/component/beyla/ebpf/args.go
@@ -117,6 +117,8 @@ type Metrics struct {
 	Instrumentations                []string `alloy:"instrumentations,attr,optional"`
 	AllowServiceGraphSelfReferences bool     `alloy:"allow_service_graph_self_references,attr,optional"`
 	Network                         Network  `alloy:"network,block,optional"`
+	ExtraResourceLabels             []string `alloy:"extra_resource_labels,attr,optional"`
+	ExtraSpanResourceLabels         []string `alloy:"extra_span_resource_labels,attr,optional"`
 }
  • Wiring to Prometheus config:
--- a/internal/component/beyla/ebpf/beyla_linux.go
+++ b/internal/component/beyla/ebpf/beyla_linux.go
@@ -444,6 +444,12 @@ func (args Metrics) Convert() prom.PrometheusConfig {
 		p.Instrumentations = args.Instrumentations
 	}
 	p.AllowServiceGraphSelfReferences = args.AllowServiceGraphSelfReferences
+	if args.ExtraResourceLabels != nil {
+		p.ExtraResourceLabels = args.ExtraResourceLabels
+	}
+	if args.ExtraSpanResourceLabels != nil {
+		p.ExtraSpanResourceLabels = args.ExtraSpanResourceLabels
+	}
 	return p
 }
  • Tests updated to assert defaults and pass-through:
--- a/internal/component/beyla/ebpf/beyla_linux_test.go
+++ b/internal/component/beyla/ebpf/beyla_linux_test.go
@@ -821,16 +821,37 @@ func TestConvert_Prometheus(t *testing.T) {
 		Features:                        []string{"application", "network"},
 		Instrumentations:                []string{"redis", "sql"},
 		AllowServiceGraphSelfReferences: true,
+		ExtraResourceLabels:             nil,
+		ExtraSpanResourceLabels:         []string{"service.version"},
 	}
@@
 	expectedConfig.AllowServiceGraphSelfReferences = true
+	expectedConfig.ExtraSpanResourceLabels = args.ExtraSpanResourceLabels
@@
+	args = Metrics{
+		Features:                        []string{"application", "network"},
+		Instrumentations:                []string{"redis", "sql"},
+		AllowServiceGraphSelfReferences: true,
+		ExtraResourceLabels:             []string{"service.version"},
+	}
@@
+	expectedConfig.ExtraResourceLabels = args.ExtraResourceLabels
+	expectedConfig.ExtraSpanResourceLabels = []string{"k8s.cluster.name", "k8s.namespace.name", "service.version", "deployment.environment"}

Operational consideration:

  • If you rely on strict label sets, note the added default extra_span_resource_labels can increase metric cardinality. You can explicitly set extra_span_resource_labels (including to []) to control this.

No other breaking API changes were identified for this bump.

go.opentelemetry.io/obi (replace) ⇒ github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.7 → v1.3.10 — ✅ Safe

Summary:

  • The replace directive is updated from v1.3.7 to v1.3.10.
  • No code changes in this repository were required; the PR contains no import or usage changes tied to this bump.

Notes:

  • This module is commonly used transitively by Beyla. With no direct APIs referenced in this repo (no related diffs), the upgrade is non-impacting for Alloy’s code.
  • Run CI/tests to validate runtime behavior as usual.

Changelog reference:

  • No breaking API changes were surfaced in this PR; upgrade appears to include fixes/improvements only. No code modifications in Alloy were necessary.

Notes

  • Documentation updated to reflect Beyla v2.7.8 and new options. If you want to keep existing behavior with minimal label cardinality, explicitly configure extra_span_resource_labels to match prior expectations (or leave as default if the new labels are desired).

@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

💻 Deploy preview deleted (Upgrade Beyla component to 2.7.7).

@dehaansa dehaansa merged commit 96b4e9d into main Nov 20, 2025
45 checks passed
@dehaansa dehaansa deleted the upgrade_beyla_2.7.7 branch November 20, 2025 17:10
jharvey10 pushed a commit that referenced this pull request Nov 24, 2025
* upgrade beyla to 2.7.7

* update to Beyla 2.7.8

* update docs
@jharvey10 jharvey10 mentioned this pull request Nov 24, 2025
jharvey10 added a commit that referenced this pull request Nov 24, 2025
* ci: sync publish workflow with main

* Vendor Alertmanager config (#4905)

* Vendor Alertmanager config

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* beyla: add meta_cache_address to beyla.ebpf.attributes.kubernetes (#4871)

* beyla: add meta_cache_address to beyla.ebpf.attributes.kubernetes

* chore: update changelog

* chore: lint

---------

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>

* Upgrade Beyla component to 2.7.7 (#4891)

* upgrade beyla to 2.7.7

* update to Beyla 2.7.8

* update docs

* fix(pyroscope.ebpf): Use meter noop in otel-ebpf-profiler (#4920)

With a recent change, the default meter provider was no longer
initialized. This change disables the otel-ebpf-profiler internal
metrics to avoid warnings like this to appear:

```
WARN[0121] Invalid metric id 102, skipping
WARN[0121] Invalid metric id 272, skipping
```

* bump rc version in changelog

---------

Co-authored-by: Paulin Todev <paulin.todev@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Stephen Lang <skl@users.noreply.github.com>
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Co-authored-by: Nikola Grcevski <6207777+grcevski@users.noreply.github.com>
Co-authored-by: Christian Simon <simon@swine.de>
dehaansa pushed a commit to madhub/alloy that referenced this pull request Dec 10, 2025
* upgrade beyla to 2.7.7

* update to Beyla 2.7.8

* update docs
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants