Skip to content

Commit 96b4e9d

Browse files
authored
Upgrade Beyla component to 2.7.7 (#4891)
* upgrade beyla to 2.7.7 * update to Beyla 2.7.8 * update docs
1 parent cc7448f commit 96b4e9d

File tree

9 files changed

+55
-10
lines changed

9 files changed

+55
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ v1.12.0-rc.0
113113

114114
- `prometheus.exporter.postgres` dependency has been updated to v0.18.1. This includes new `stat_progress_vacuum` and `buffercache_summary` collectors, as well as other bugfixes and enhancements. (@cristiangreco)
115115

116-
- Update Beyla component to 2.7.4. (@grcevski)
116+
- Update Beyla component to 2.7.8. (@grcevski)
117117

118118
- Support delimiters in `stage.luhn`. (@dehaansa)
119119

docs/sources/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cascade:
88
OTEL_VERSION: v0.139.0
99
PROM_WIN_EXP_VERSION: v0.31.3
1010
SNMP_VERSION: v0.29.0
11-
BEYLA_VERSION: v2.5.8
11+
BEYLA_VERSION: v2.7.8
1212
FULL_PRODUCT_NAME: Grafana Alloy
1313
PRODUCT_NAME: Alloy
1414
hero:

docs/sources/_index.md.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cascade:
88
OTEL_VERSION: v0.139.0
99
PROM_WIN_EXP_VERSION: v0.31.3
1010
SNMP_VERSION: v0.29.0
11-
BEYLA_VERSION: v2.5.8
11+
BEYLA_VERSION: v2.7.8
1212
FULL_PRODUCT_NAME: Grafana Alloy
1313
PRODUCT_NAME: Alloy
1414
hero:

docs/sources/reference/components/beyla/beyla.ebpf.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,8 @@ The `metrics` block configures which metrics Beyla collects.
535535
| `allow_service_graph_self_references` | `bool` | Allow service graph metrics to reference the same service. | `false` | no |
536536
| `features` | `list(string)` | List of features to enable for the metrics. | `["application"]` | no |
537537
| `instrumentations` | `list(string)` | List of instrumentations to enable for the metrics. | `["*"]` | no |
538+
| `extra_resource_labels` | `list(string)` | List of OTEL resource labels to include on `target_info`. | `[]` | no |
539+
| `extra_span_resource_labels` | `list(string)` | List of OTEL resource labels to include on span metrics. | `["k8s.cluster.name", "k8s.namespace.name", "service.version", "deployment.environment"]` | no |
538540

539541
`features` is a list of features to enable for the metrics. The following features are available:
540542

@@ -559,6 +561,20 @@ The `metrics` block configures which metrics Beyla collects.
559561
* `redis` enables the collection of Redis client/server database metrics.
560562
* `sql` enables the collection of SQL database client call metrics.
561563

564+
`extra_resource_labels` is a list of OTEL resource labels, supplied through the `OTEL_RESOURCE_ATTRIBUTES` environment variable
565+
on the service, that you want to include on the `target_info` metric.
566+
567+
`extra_span_resource_labels` is a list of OTEL resource labels, supplied through the `OTEL_RESOURCE_ATTRIBUTES` environment variable
568+
on the service, that you want to include on the span metrics. The default list includes:
569+
570+
* `k8s.cluster.name`
571+
* `k8s.namespace.name`
572+
* `service.version`
573+
* `deployment.environment`
574+
575+
The default list of `extra_span_resource_labels` is set to match the defaults chosen by Application Observability plugin in
576+
Grafana Cloud.
577+
562578
#### `network` metrics
563579

564580
The `network` block configures network metrics options for Beyla. You must append `network` to the `features` list in the `metrics` block to enable network metrics.

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ require (
6363
github.com/gorilla/mux v1.8.1
6464
github.com/grafana/alloy-remote-config v0.0.12
6565
github.com/grafana/alloy/syntax v0.1.0
66-
github.com/grafana/beyla/v2 v2.7.6
66+
github.com/grafana/beyla/v2 v2.7.8
6767
github.com/grafana/catchpoint-prometheus-exporter v0.0.0-20250218151502-6e97feaee761
6868
github.com/grafana/ckit v0.0.0-20251024151910-87043f5a3cf7
6969
github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2
@@ -1082,8 +1082,8 @@ exclude (
10821082
k8s.io/client-go v12.0.0+incompatible
10831083
)
10841084

1085-
// replace go.opentelemetry.io/obi => github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.7
1086-
replace go.opentelemetry.io/obi => github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.7
1085+
// replace go.opentelemetry.io/obi => github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.9
1086+
replace go.opentelemetry.io/obi => github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.10
10871087

10881088
replace go.opentelemetry.io/ebpf-profiler => github.com/grafana/opentelemetry-ebpf-profiler v0.0.202546-0.20251106085643-a00a0ef2a84c
10891089

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,8 +1129,8 @@ github.com/gosnmp/gosnmp v1.41.0 h1:6RI78g2ZsbLvpvJegcV98LapszRQnbvYNKSa5WbCll4=
11291129
github.com/gosnmp/gosnmp v1.41.0/go.mod h1:CxVS6bXqmWZlafUj9pZUnQX5e4fAltqPcijxWpCitDo=
11301130
github.com/grafana/alloy-remote-config v0.0.12 h1:zyuDgWaXBITD3OFY/LDh0iShDb3ye4Av39u2xY1JY1s=
11311131
github.com/grafana/alloy-remote-config v0.0.12/go.mod h1:kHE1usYo2WAVCikQkIXuoG1Clz8BSdiz3kF+DZSCQ4k=
1132-
github.com/grafana/beyla/v2 v2.7.6 h1:fqkFSzBpuo81Udn9n2viphAM52LGXl3vXq8eUEqvhAA=
1133-
github.com/grafana/beyla/v2 v2.7.6/go.mod h1:isxApXkKInJ+itgn4lDqEfCb0a97TjxWzp1tf+fpWOE=
1132+
github.com/grafana/beyla/v2 v2.7.8 h1:GSfv09nOhhbIBP9uR5rEEAwPEpCn9Gq83HR9x2woDfU=
1133+
github.com/grafana/beyla/v2 v2.7.8/go.mod h1:isxApXkKInJ+itgn4lDqEfCb0a97TjxWzp1tf+fpWOE=
11341134
github.com/grafana/cadvisor v0.0.0-20240729082359-1f04a91701e2 h1:ju6EcY2aEobeBg185ETtFCKj5WzaQ48qfkbsSRRQrF4=
11351135
github.com/grafana/cadvisor v0.0.0-20240729082359-1f04a91701e2/go.mod h1:8sLW/G7rcFe1CKMaA4pYT4mX3P1xQVGqM6luzEzx/2g=
11361136
github.com/grafana/catchpoint-prometheus-exporter v0.0.0-20250218151502-6e97feaee761 h1:dPJOIEwtQ8uR3Qa79pb/lsSFJQ6j4P9vpCUQ4fKimG4=
@@ -1173,8 +1173,8 @@ github.com/grafana/opentelemetry-collector-contrib/processor/k8sattributesproces
11731173
github.com/grafana/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.0.0-20251021125353-73458b01ab23/go.mod h1:7+xyIHr2PJNE9kic/D91c9SMxACdGIGCJykzTcqsYv0=
11741174
github.com/grafana/opentelemetry-collector/featuregate v0.0.0-20240325174506-2fd1623b2ca0 h1:i/Ne0XwoRokYj52ZcSmnvuyID3h/uA91n0Ycg/grHU8=
11751175
github.com/grafana/opentelemetry-collector/featuregate v0.0.0-20240325174506-2fd1623b2ca0/go.mod h1:mm8+xyQfgDmqhyegZRNIQmoKsNnDTwWKFLsdMoXAb7A=
1176-
github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.7 h1:1BIaJoHYtFNCCxW/JCOCAnWR+HyR5ISGkYwtzRb1d8I=
1177-
github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.7/go.mod h1:/O9nceaQ+yhwDdosHsQrs1AilAJWAZf2Laa2DssrjJk=
1176+
github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.10 h1:35vEGwoeJ379F7J1QejAeqVvD/8KHD5Jhw6/8+wSFJ0=
1177+
github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.10/go.mod h1:/O9nceaQ+yhwDdosHsQrs1AilAJWAZf2Laa2DssrjJk=
11781178
github.com/grafana/opentelemetry-ebpf-profiler v0.0.202546-0.20251106085643-a00a0ef2a84c h1:I9KB024eev8z9NRJZTcmTw0V0+txKLC6RqPUX3ADO2s=
11791179
github.com/grafana/opentelemetry-ebpf-profiler v0.0.202546-0.20251106085643-a00a0ef2a84c/go.mod h1:eXOwk9x2rmJZ9+Ov5ot7NitRWNmF0jynNEeuIDRnK/Q=
11801180
github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8=

internal/component/beyla/ebpf/args.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ type Metrics struct {
118118
Instrumentations []string `alloy:"instrumentations,attr,optional"`
119119
AllowServiceGraphSelfReferences bool `alloy:"allow_service_graph_self_references,attr,optional"`
120120
Network Network `alloy:"network,block,optional"`
121+
ExtraResourceLabels []string `alloy:"extra_resource_labels,attr,optional"`
122+
ExtraSpanResourceLabels []string `alloy:"extra_span_resource_labels,attr,optional"`
121123
}
122124

123125
type Traces struct {

internal/component/beyla/ebpf/beyla_linux.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,12 @@ func (args Metrics) Convert() prom.PrometheusConfig {
447447
p.Instrumentations = args.Instrumentations
448448
}
449449
p.AllowServiceGraphSelfReferences = args.AllowServiceGraphSelfReferences
450+
if args.ExtraResourceLabels != nil {
451+
p.ExtraResourceLabels = args.ExtraResourceLabels
452+
}
453+
if args.ExtraSpanResourceLabels != nil {
454+
p.ExtraSpanResourceLabels = args.ExtraSpanResourceLabels
455+
}
450456
return p
451457
}
452458

internal/component/beyla/ebpf/beyla_linux_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,16 +825,37 @@ func TestConvert_Prometheus(t *testing.T) {
825825
Features: []string{"application", "network"},
826826
Instrumentations: []string{"redis", "sql"},
827827
AllowServiceGraphSelfReferences: true,
828+
ExtraResourceLabels: nil,
829+
ExtraSpanResourceLabels: []string{"service.version"},
828830
}
829831

830832
expectedConfig := beyla.DefaultConfig.Prometheus
831833
expectedConfig.Features = args.Features
832834
expectedConfig.Instrumentations = args.Instrumentations
833835
expectedConfig.AllowServiceGraphSelfReferences = true
836+
expectedConfig.ExtraSpanResourceLabels = args.ExtraSpanResourceLabels
834837

835838
config := args.Convert()
836839

837840
require.Equal(t, expectedConfig, config)
841+
842+
args = Metrics{
843+
Features: []string{"application", "network"},
844+
Instrumentations: []string{"redis", "sql"},
845+
AllowServiceGraphSelfReferences: true,
846+
ExtraResourceLabels: []string{"service.version"},
847+
}
848+
849+
expectedConfig = beyla.DefaultConfig.Prometheus
850+
expectedConfig.Features = args.Features
851+
expectedConfig.Instrumentations = args.Instrumentations
852+
expectedConfig.AllowServiceGraphSelfReferences = true
853+
expectedConfig.ExtraResourceLabels = args.ExtraResourceLabels
854+
expectedConfig.ExtraSpanResourceLabels = []string{"k8s.cluster.name", "k8s.namespace.name", "service.version", "deployment.environment"}
855+
856+
config = args.Convert()
857+
858+
require.Equal(t, expectedConfig, config)
838859
}
839860

840861
func TestConvert_Network(t *testing.T) {

0 commit comments

Comments
 (0)