Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ v1.12.0-rc.0

- `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)

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

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

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cascade:
OTEL_VERSION: v0.139.0
PROM_WIN_EXP_VERSION: v0.31.3
SNMP_VERSION: v0.29.0
BEYLA_VERSION: v2.5.8
BEYLA_VERSION: v2.7.8
FULL_PRODUCT_NAME: Grafana Alloy
PRODUCT_NAME: Alloy
hero:
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/_index.md.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cascade:
OTEL_VERSION: v0.139.0
PROM_WIN_EXP_VERSION: v0.31.3
SNMP_VERSION: v0.29.0
BEYLA_VERSION: v2.5.8
BEYLA_VERSION: v2.7.8
FULL_PRODUCT_NAME: Grafana Alloy
PRODUCT_NAME: Alloy
hero:
Expand Down
16 changes: 16 additions & 0 deletions docs/sources/reference/components/beyla/beyla.ebpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,8 @@ The `metrics` block configures which metrics Beyla collects.
| `allow_service_graph_self_references` | `bool` | Allow service graph metrics to reference the same service. | `false` | no |
| `features` | `list(string)` | List of features to enable for the metrics. | `["application"]` | no |
| `instrumentations` | `list(string)` | List of instrumentations to enable for the metrics. | `["*"]` | no |
| `extra_resource_labels` | `list(string)` | List of OTEL resource labels to include on `target_info`. | `[]` | no |
| `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 |

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

Expand All @@ -558,6 +560,20 @@ The `metrics` block configures which metrics Beyla collects.
* `redis` enables the collection of Redis client/server database metrics.
* `sql` enables the collection of SQL database client call metrics.

`extra_resource_labels` is a list of OTEL resource labels, supplied through the `OTEL_RESOURCE_ATTRIBUTES` environment variable
on the service, that you want to include on the `target_info` metric.

`extra_span_resource_labels` is a list of OTEL resource labels, supplied through the `OTEL_RESOURCE_ATTRIBUTES` environment variable
on the service, that you want to include on the span metrics. The default list includes:

* `k8s.cluster.name`
* `k8s.namespace.name`
* `service.version`
* `deployment.environment`

The default list of `extra_span_resource_labels` is set to match the defaults chosen by Application Observability plugin in
Grafana Cloud.

#### `network` metrics

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.
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ require (
github.com/gorilla/mux v1.8.1
github.com/grafana/alloy-remote-config v0.0.12
github.com/grafana/alloy/syntax v0.1.0
github.com/grafana/beyla/v2 v2.7.6
github.com/grafana/beyla/v2 v2.7.8
github.com/grafana/catchpoint-prometheus-exporter v0.0.0-20250218151502-6e97feaee761
github.com/grafana/ckit v0.0.0-20251024151910-87043f5a3cf7
github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2
Expand Down Expand Up @@ -1082,8 +1082,8 @@ exclude (
k8s.io/client-go v12.0.0+incompatible
)

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

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

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1129,8 +1129,8 @@ github.com/gosnmp/gosnmp v1.41.0 h1:6RI78g2ZsbLvpvJegcV98LapszRQnbvYNKSa5WbCll4=
github.com/gosnmp/gosnmp v1.41.0/go.mod h1:CxVS6bXqmWZlafUj9pZUnQX5e4fAltqPcijxWpCitDo=
github.com/grafana/alloy-remote-config v0.0.12 h1:zyuDgWaXBITD3OFY/LDh0iShDb3ye4Av39u2xY1JY1s=
github.com/grafana/alloy-remote-config v0.0.12/go.mod h1:kHE1usYo2WAVCikQkIXuoG1Clz8BSdiz3kF+DZSCQ4k=
github.com/grafana/beyla/v2 v2.7.6 h1:fqkFSzBpuo81Udn9n2viphAM52LGXl3vXq8eUEqvhAA=
github.com/grafana/beyla/v2 v2.7.6/go.mod h1:isxApXkKInJ+itgn4lDqEfCb0a97TjxWzp1tf+fpWOE=
github.com/grafana/beyla/v2 v2.7.8 h1:GSfv09nOhhbIBP9uR5rEEAwPEpCn9Gq83HR9x2woDfU=
github.com/grafana/beyla/v2 v2.7.8/go.mod h1:isxApXkKInJ+itgn4lDqEfCb0a97TjxWzp1tf+fpWOE=
github.com/grafana/cadvisor v0.0.0-20240729082359-1f04a91701e2 h1:ju6EcY2aEobeBg185ETtFCKj5WzaQ48qfkbsSRRQrF4=
github.com/grafana/cadvisor v0.0.0-20240729082359-1f04a91701e2/go.mod h1:8sLW/G7rcFe1CKMaA4pYT4mX3P1xQVGqM6luzEzx/2g=
github.com/grafana/catchpoint-prometheus-exporter v0.0.0-20250218151502-6e97feaee761 h1:dPJOIEwtQ8uR3Qa79pb/lsSFJQ6j4P9vpCUQ4fKimG4=
Expand Down Expand Up @@ -1173,8 +1173,8 @@ github.com/grafana/opentelemetry-collector-contrib/processor/k8sattributesproces
github.com/grafana/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.0.0-20251021125353-73458b01ab23/go.mod h1:7+xyIHr2PJNE9kic/D91c9SMxACdGIGCJykzTcqsYv0=
github.com/grafana/opentelemetry-collector/featuregate v0.0.0-20240325174506-2fd1623b2ca0 h1:i/Ne0XwoRokYj52ZcSmnvuyID3h/uA91n0Ycg/grHU8=
github.com/grafana/opentelemetry-collector/featuregate v0.0.0-20240325174506-2fd1623b2ca0/go.mod h1:mm8+xyQfgDmqhyegZRNIQmoKsNnDTwWKFLsdMoXAb7A=
github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.7 h1:1BIaJoHYtFNCCxW/JCOCAnWR+HyR5ISGkYwtzRb1d8I=
github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.7/go.mod h1:/O9nceaQ+yhwDdosHsQrs1AilAJWAZf2Laa2DssrjJk=
github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.10 h1:35vEGwoeJ379F7J1QejAeqVvD/8KHD5Jhw6/8+wSFJ0=
github.com/grafana/opentelemetry-ebpf-instrumentation v1.3.10/go.mod h1:/O9nceaQ+yhwDdosHsQrs1AilAJWAZf2Laa2DssrjJk=
github.com/grafana/opentelemetry-ebpf-profiler v0.0.202546-0.20251106085643-a00a0ef2a84c h1:I9KB024eev8z9NRJZTcmTw0V0+txKLC6RqPUX3ADO2s=
github.com/grafana/opentelemetry-ebpf-profiler v0.0.202546-0.20251106085643-a00a0ef2a84c/go.mod h1:eXOwk9x2rmJZ9+Ov5ot7NitRWNmF0jynNEeuIDRnK/Q=
github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8=
Expand Down
2 changes: 2 additions & 0 deletions internal/component/beyla/ebpf/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Comment thread
blewis12 marked this conversation as resolved.
ExtraSpanResourceLabels []string `alloy:"extra_span_resource_labels,attr,optional"`
}

type Traces struct {
Expand Down
6 changes: 6 additions & 0 deletions internal/component/beyla/ebpf/beyla_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
21 changes: 21 additions & 0 deletions internal/component/beyla/ebpf/beyla_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 := beyla.DefaultConfig.Prometheus
expectedConfig.Features = args.Features
expectedConfig.Instrumentations = args.Instrumentations
expectedConfig.AllowServiceGraphSelfReferences = true
expectedConfig.ExtraSpanResourceLabels = args.ExtraSpanResourceLabels

config := args.Convert()

require.Equal(t, expectedConfig, config)

args = Metrics{
Features: []string{"application", "network"},
Instrumentations: []string{"redis", "sql"},
AllowServiceGraphSelfReferences: true,
ExtraResourceLabels: []string{"service.version"},
}

expectedConfig = beyla.DefaultConfig.Prometheus
expectedConfig.Features = args.Features
expectedConfig.Instrumentations = args.Instrumentations
expectedConfig.AllowServiceGraphSelfReferences = true
expectedConfig.ExtraResourceLabels = args.ExtraResourceLabels
expectedConfig.ExtraSpanResourceLabels = []string{"k8s.cluster.name", "k8s.namespace.name", "service.version", "deployment.environment"}

config = args.Convert()

require.Equal(t, expectedConfig, config)
}

func TestConvert_Network(t *testing.T) {
Expand Down
Loading