Skip to content

Commit

Permalink
Make it so the beyla config can be config'd
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Wall <[email protected]>
  • Loading branch information
petewall committed Jan 10, 2025
1 parent a37e6de commit 2939db8
Show file tree
Hide file tree
Showing 11 changed files with 282 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Be sure perform actual integration testing in a live environment in the main [k8

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| beyla.config.data | object | `{"attributes":{"kubernetes":{"enable":true}},"internal_metrics":{"prometheus":{"path":"/internal/metrics"}},"prometheus_export":{"features":["application","network","application_service_graph","application_span"],"path":"/metrics"}}` | The configuration for Grafana Beyla Some sections will be set automatically, such as the cluster name. Others will be modified depending on the value of beyla.preset. |
| beyla.extraDiscoveryRules | string | `""` | Rule blocks to be added to the discovery.relabel component for Beyla. These relabeling rules are applied pre-scrape against the targets from service discovery. Before the scrape, any remaining target labels that start with __ (i.e. __meta_kubernetes*) are dropped. ([docs](https://grafana.com/docs/alloy/latest/reference/components/discovery.relabel/#rule-block)) |
| beyla.extraMetricProcessingRules | string | `""` | Rule blocks to be added to the prometheus.relabel component for Beyla. ([docs](https://grafana.com/docs/alloy/latest/reference/components/prometheus.relabel/#rule-block)) These relabeling rules are applied post-scrape against the metrics returned from the scraped target, no __meta* labels are present. |
| beyla.labelMatchers | object | `{"app.kubernetes.io/name":"beyla"}` | Label matchers used to select the Beyla pods for scraping metrics. |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
del(.properties.beyla.properties.config.properties.data.properties)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"create": {
"type": "boolean"
},
"data": {
"type": "object"
},
"skipConfigMapCheck": {
"type": "boolean"
}
Expand Down Expand Up @@ -55,6 +58,9 @@
"podAnnotations": {
"type": "object",
"properties": {
"k8s.grafana.com/job": {
"type": "string"
},
"k8s.grafana.com/logs.job": {
"type": "string"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,50 @@ beyla:
# @section -- Beyla
maxCacheSize:

# @ignored
config:
# @ignored -- This allows this chart to create the ConfigMap while also keeping the default name
skipConfigMapCheck: true
# @ignored -- This allows this chart to create the Beyla ConfigMap with required modifications
create: false

# -- The configuration for Grafana Beyla
# Some sections will be set automatically, such as the cluster name.
# Others will be modified depending on the value of beyla.preset.
# @section -- Beyla
data:
attributes:
kubernetes:
enable: true
# @ignored -- This will be replaced by the actual cluster name
# cluster_name: ""
internal_metrics:
prometheus:
# @ignored -- This will be replaced with service.targetPort below
port: 9090
path: /internal/metrics
prometheus_export:
# @ignored -- This will be replaced with service.targetPort below
port: 9090
path: /metrics
features:
- application
- network
- application_service_graph
- application_span

# @ignored -- If the Application Observability feature is enabled, and if there is an HTTP or gRPC receiver, the

Check failure on line 101 in charts/k8s-monitoring/charts/feature-auto-instrumentation/values.yaml

View workflow job for this annotation

GitHub Actions / runner / yamllint

[yamllint] reported by reviewdog 🐶 [warning] comment not indented like content (comments-indentation) Raw Output: ./charts/k8s-monitoring/charts/feature-auto-instrumentation/values.yaml:101:7: [warning] comment not indented like content (comments-indentation)
# endpoint will be set here.
# otel_traces_export:
# endpoint: ""

# -- The port number for the Beyla service.
# @section -- Beyla
service:
targetPort: 9090

# @ignored
podAnnotations:
k8s.grafana.com/job: default/beyla
k8s.grafana.com/logs.job: integrations/beyla

# @ignored -- Beyla can only install to Linux nodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,58 @@ applicationObservability:

autoInstrumentation:
enabled: true
beyla:
config:
data:
attributes:
kubernetes:
enable: true
select:
beyla_network_flow_bytes:
include:
- direction
- k8s.cluster.name
- k8s.dst.name
- k8s.dst.namespace
- k8s.dst.owner.name
- k8s.dst.owner.type
- k8s.src.name
- k8s.src.namespace
- k8s.src.owner.name
- k8s.src.owner.type
discovery:
exclude_otel_instrumented_services: false
services:
- k8s_pod_labels:
instrument: beyla
log_level: debug
network:
enable: true
prometheus_export:
path: /metrics
features:
- application
- application_process
- application_service_graph
- application_span
- network
internal_metrics:
prometheus:
path: /internal/metrics
routes:
patterns:
- /account
- /api/products/{productId}
- /cart
- /fastcache
- /health
- /login
- /payment
ignored_patterns:
- /debug/*
- /metrics
unmatched: heuristic
preset: application

alloy-metrics:
enabled: true
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,58 @@ applicationObservability:

autoInstrumentation:
enabled: true
beyla:
config:
data:
attributes:
kubernetes:
enable: true
select:
beyla_network_flow_bytes:
include:
- direction
- k8s.cluster.name
- k8s.dst.name
- k8s.dst.namespace
- k8s.dst.owner.name
- k8s.dst.owner.type
- k8s.src.name
- k8s.src.namespace
- k8s.src.owner.name
- k8s.src.owner.type
discovery:
exclude_otel_instrumented_services: false
services:
- k8s_pod_labels:
instrument: beyla
log_level: debug
network:
enable: true
prometheus_export:
path: /metrics
features:
- application
- application_process
- application_service_graph
- application_span
- network
internal_metrics:
prometheus:
path: /internal/metrics
routes:
patterns:
- /account
- /api/products/{productId}
- /cart
- /fastcache
- /health
- /login
- /payment
ignored_patterns:
- /debug/*
- /metrics
unmatched: heuristic
preset: application

alloy-metrics:
enabled: true
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2939db8

Please sign in to comment.