From f304a8a74b9ef7eb5b72d8e5e8a7192255968c78 Mon Sep 17 00:00:00 2001 From: Mario Macias Date: Mon, 15 Jan 2024 16:04:49 +0100 Subject: [PATCH 1/2] Add BEYLA_CONFIG env var --- cmd/beyla/main.go | 4 ++++ deployments/03-instrumented-app.yml | 3 ++- docs/sources/configure/export-modes.md | 9 ++++++++- docs/sources/configure/options.md | 10 ++++++++-- docs/sources/distributed-traces.md | 5 ++--- docs/sources/quickstart/cpp.md | 2 +- docs/sources/quickstart/golang.md | 2 +- docs/sources/quickstart/nodejs.md | 2 +- docs/sources/quickstart/python.md | 2 +- docs/sources/quickstart/ruby.md | 2 +- docs/sources/quickstart/rust.md | 2 +- docs/sources/setup/kubernetes.md | 9 ++++++--- docs/sources/tutorial/k8s-walkthrough.md | 3 ++- examples/greeting-apps/docker-compose.yaml | 16 ++++------------ test/integration/docker-compose-1.16.yml | 4 +--- test/integration/docker-compose-java-host.yml | 4 +--- test/integration/docker-compose-java-pid.yml | 4 +--- .../docker-compose-java-system-wide.yml | 4 +--- test/integration/docker-compose-python.yml | 4 +--- .../manifests/05-instrumented-service-otel.yml | 2 ++ .../05-instrumented-service-prometheus.yml | 3 ++- 21 files changed, 51 insertions(+), 45 deletions(-) diff --git a/cmd/beyla/main.go b/cmd/beyla/main.go index 56b3a052c..22694caa0 100644 --- a/cmd/beyla/main.go +++ b/cmd/beyla/main.go @@ -32,6 +32,10 @@ func main() { configPath := flag.String("config", "", "path to the configuration file") flag.Parse() + if cfg := os.Getenv("BEYLA_CONFIG"); cfg != "" { + configPath = &cfg + } + config := loadConfig(configPath) if err := lvl.UnmarshalText([]byte(config.LogLevel)); err != nil { diff --git a/deployments/03-instrumented-app.yml b/deployments/03-instrumented-app.yml index e37d9ed09..88dd6e88e 100644 --- a/deployments/03-instrumented-app.yml +++ b/deployments/03-instrumented-app.yml @@ -55,7 +55,6 @@ spec: - name: autoinstrumenter image: grafana/beyla:main imagePullPolicy: IfNotPresent - command: ["/beyla", "--config=/config/beyla-config.yml"] securityContext: privileged: true runAsUser: 0 @@ -65,6 +64,8 @@ spec: - mountPath: /sys/kernel/security name: system-config env: + - name: BEYLA_CONFIG + value: "/config/beyla-config.yml" - name: BEYLA_SERVICE_NAME value: "goblog" - name: BEYLA_PRINT_TRACES diff --git a/docs/sources/configure/export-modes.md b/docs/sources/configure/export-modes.md index 1073a4cf2..9bec6ec76 100644 --- a/docs/sources/configure/export-modes.md +++ b/docs/sources/configure/export-modes.md @@ -194,8 +194,15 @@ allow exporting both metrics and traces, or only one of them to export either metrics or traces. To run the auto-instrumentation tool (previously downloaded from the [Beyla releases page](https://github.com/grafana/beyla/releases)), -you will need to specify the path to the configuration YAML file. For example `instrument-config.yml`: +you will need to specify the path to the configuration YAML file, either with the +`-config` command-line argument or the `BEYLA_CONFIG` environment variable. +For example `instrument-config.yml`: ``` beyla -config instrument-config.yml ``` +or +``` +BEYLA_CONFIG=instrument-config.yml beyla +``` + diff --git a/docs/sources/configure/options.md b/docs/sources/configure/options.md index e7276166a..0433e8b9d 100644 --- a/docs/sources/configure/options.md +++ b/docs/sources/configure/options.md @@ -13,14 +13,20 @@ aliases: # Beyla configuration options Beyla can be configured via environment variables or via -a YAML configuration file that is passed with the `-config` command-line -argument. Environment variables have priority over the properties in the +a YAML configuration file that is passed either with the `-config` command-line +argument or the `BEYLA_CONFIG` environment variable. +Environment variables have priority over the properties in the configuration file. For example, in the following command line, the BEYLA_OPEN_PORT option, is used to override any open_port settings inside the config.yaml file: ``` $ BEYLA_OPEN_PORT=8080 beyla -config /path/to/config.yaml ``` +or +``` +$ BEYLA_OPEN_PORT=8080 BEYLA_CONFIG=/path/to/config.yaml beyla +``` + At the end of this document, there is an [example of YAML configuration file](#yaml-file-example). diff --git a/docs/sources/distributed-traces.md b/docs/sources/distributed-traces.md index 497ab1636..c2da22139 100644 --- a/docs/sources/distributed-traces.md +++ b/docs/sources/distributed-traces.md @@ -46,9 +46,8 @@ services: ... beyla: image: grafana/beyla:latest - command: - - /beyla - - --config=/configs/beyla-config.yml + environment: + BEYLA_CONFIG: "/configs/beyla-config.yml" volumes: - /sys/kernel/security:/sys/kernel/security ``` diff --git a/docs/sources/quickstart/cpp.md b/docs/sources/quickstart/cpp.md index 4eda4cd80..efae33554 100644 --- a/docs/sources/quickstart/cpp.md +++ b/docs/sources/quickstart/cpp.md @@ -111,7 +111,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument: +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/golang.md b/docs/sources/quickstart/golang.md index 5abe86923..a3823f9e0 100644 --- a/docs/sources/quickstart/golang.md +++ b/docs/sources/quickstart/golang.md @@ -122,7 +122,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument: +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/nodejs.md b/docs/sources/quickstart/nodejs.md index 34bac11e0..93f665d69 100644 --- a/docs/sources/quickstart/nodejs.md +++ b/docs/sources/quickstart/nodejs.md @@ -121,7 +121,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument: +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/python.md b/docs/sources/quickstart/python.md index 2aeb50517..29df3e382 100644 --- a/docs/sources/quickstart/python.md +++ b/docs/sources/quickstart/python.md @@ -119,7 +119,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument: +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/ruby.md b/docs/sources/quickstart/ruby.md index 4f5cb4fc9..d215c9f72 100644 --- a/docs/sources/quickstart/ruby.md +++ b/docs/sources/quickstart/ruby.md @@ -119,7 +119,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument: +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/rust.md b/docs/sources/quickstart/rust.md index 284188aa6..caf4804c9 100644 --- a/docs/sources/quickstart/rust.md +++ b/docs/sources/quickstart/rust.md @@ -107,7 +107,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument: +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/setup/kubernetes.md b/docs/sources/setup/kubernetes.md index 4db541a39..cd36a0dbb 100644 --- a/docs/sources/setup/kubernetes.md +++ b/docs/sources/setup/kubernetes.md @@ -245,7 +245,7 @@ this site). To provide the configuration as a file, the recommended way is to deploy a ConfigMap with the intended configuration, then mount it into the Beyla -Pod, and refer to it by overriding the Beyla container command. +Pod, and refer to it with the `BEYLA_CONFIG` environment variable. Example of ConfigMap with the Beyla YAML documentation: @@ -302,8 +302,11 @@ spec: volumeMounts: - mountPath: /config name: beyla-config - # tell beyla where to find the configuration file - command: ["/beyla", "--config=/config/beyla-config.yml"] + env: + # tell beyla where to find the configuration file + - name: BEYLA_CONFIG + value: "/config/beyla-config.yml" + ``` ## Providing secret configuration diff --git a/docs/sources/tutorial/k8s-walkthrough.md b/docs/sources/tutorial/k8s-walkthrough.md index 10e45f551..64d8d1fbf 100644 --- a/docs/sources/tutorial/k8s-walkthrough.md +++ b/docs/sources/tutorial/k8s-walkthrough.md @@ -301,13 +301,14 @@ spec: - name: beyla image: grafana/beyla:main imagePullPolicy: IfNotPresent - command: ["/beyla", "--config=/config/beyla-config.yml"] securityContext: privileged: true # mandatory! volumeMounts: - mountPath: /config name: beyla-config env: + - name: BEYLA_CONFIG + value: "/config/beyla-config.yml" - name: OTEL_EXPORTER_OTLP_ENDPOINT valueFrom: secretKeyRef: diff --git a/examples/greeting-apps/docker-compose.yaml b/examples/greeting-apps/docker-compose.yaml index 724984634..fbe2132a4 100644 --- a/examples/greeting-apps/docker-compose.yaml +++ b/examples/greeting-apps/docker-compose.yaml @@ -19,9 +19,6 @@ services: # Beyla for NGINX nginxbeyla: image: grafana/beyla:latest - command: - - /beyla - - --config=/configs/beyla-config.yml volumes: - ./configs/:/configs - ./system/sys/kernel/security:/sys/kernel/security @@ -30,6 +27,7 @@ services: network_mode: "service:nginx" pid: "service:nginx" environment: + BEYLA_CONFIG: "/configs/beyla-config.yml" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "3330" BEYLA_SERVICE_NAMESPACE: "demo" @@ -51,9 +49,6 @@ services: # Beyla for Java Spring Boot 3.0 GraalVM Native Image gobeyla: image: grafana/beyla:latest - command: - - /beyla - - --config=/configs/beyla-config.yml volumes: - ./configs/:/configs - ./system/sys/kernel/security:/sys/kernel/security @@ -62,6 +57,7 @@ services: network_mode: "service:gotestserver" pid: "service:gotestserver" environment: + BEYLA_CONFIG: "/configs/beyla-config.yml" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "8080" BEYLA_SERVICE_NAMESPACE: "demo" @@ -83,9 +79,6 @@ services: # Beyla for Java Spring Boot 3.0 GraalVM Native Image javabeyla: image: grafana/beyla:latest - command: - - /beyla - - --config=/configs/beyla-config.yml volumes: - ./configs/:/configs - ./system/sys/kernel/security:/sys/kernel/security @@ -94,6 +87,7 @@ services: network_mode: "service:javatestserver" pid: "service:javatestserver" environment: + BEYLA_CONFIG: "/configs/beyla-config.yml" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "8085" BEYLA_SERVICE_NAMESPACE: "demo" @@ -115,9 +109,6 @@ services: # Beyla for Rust Actix rustbeyla: image: grafana/beyla:latest - command: - - /beyla - - --config=/configs/beyla-config.yml volumes: - ./configs/:/configs - ./system/sys/kernel/security:/sys/kernel/security @@ -126,6 +117,7 @@ services: network_mode: "service:rusttestserver" pid: "service:rusttestserver" environment: + BEYLA_CONFIG: "/configs/beyla-config.yml" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "8090" BEYLA_SERVICE_NAMESPACE: "demo" diff --git a/test/integration/docker-compose-1.16.yml b/test/integration/docker-compose-1.16.yml index 694a61d13..a9f2bfa44 100644 --- a/test/integration/docker-compose-1.16.yml +++ b/test/integration/docker-compose-1.16.yml @@ -17,9 +17,6 @@ services: build: context: ../.. dockerfile: ./test/integration/components/beyla/Dockerfile - command: - - /beyla - - --config=/configs/instrumenter-config-java.yml volumes: - ./configs/:/configs - ../../testoutput:/coverage @@ -28,6 +25,7 @@ services: privileged: true # in some environments (not GH Pull Requests) you can set it to false and then cap_add: [ SYS_ADMIN ] pid: "service:testserver" environment: + BEYLA_CONFIG: "/configs/instrumenter-config-java.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: 8080 diff --git a/test/integration/docker-compose-java-host.yml b/test/integration/docker-compose-java-host.yml index ddff9a4b5..186c8a930 100644 --- a/test/integration/docker-compose-java-host.yml +++ b/test/integration/docker-compose-java-host.yml @@ -12,9 +12,6 @@ services: build: context: ../.. dockerfile: ./test/integration/components/beyla/Dockerfile - command: - - /beyla - - --config=/configs/instrumenter-config-java-host.yml volumes: - ./configs/:/configs - ./system/sys/kernel/security:/sys/kernel/security @@ -25,6 +22,7 @@ services: network_mode: "host" pid: "host" environment: + BEYLA_CONFIG: "/configs/instrumenter-config-java-host.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "${JAVA_OPEN_PORT}" diff --git a/test/integration/docker-compose-java-pid.yml b/test/integration/docker-compose-java-pid.yml index 28800bdd7..ea6bb0c0c 100644 --- a/test/integration/docker-compose-java-pid.yml +++ b/test/integration/docker-compose-java-pid.yml @@ -12,9 +12,6 @@ services: build: context: ../.. dockerfile: ./test/integration/components/beyla/Dockerfile - command: - - /beyla - - --config=/configs/instrumenter-config-java.yml volumes: - ./configs/:/configs - ./system/sys/kernel/security:/sys/kernel/security @@ -25,6 +22,7 @@ services: network_mode: "service:testserver" pid: "service:testserver" environment: + BEYLA_CONFIG: "/configs/instrumenter-config-java.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "${JAVA_OPEN_PORT}" diff --git a/test/integration/docker-compose-java-system-wide.yml b/test/integration/docker-compose-java-system-wide.yml index dd057979d..9983a06cb 100644 --- a/test/integration/docker-compose-java-system-wide.yml +++ b/test/integration/docker-compose-java-system-wide.yml @@ -25,9 +25,6 @@ services: build: context: ../.. dockerfile: ./test/integration/components/beyla/Dockerfile - command: - - /beyla - - --config=/configs/instrumenter-config-java.yml volumes: - ./configs/:/configs - ../../testoutput:/coverage @@ -37,6 +34,7 @@ services: network_mode: "service:testserver" pid: "host" environment: + BEYLA_CONFIG: "/configs/instrumenter-config-java.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "${JAVA_OPEN_PORT}" diff --git a/test/integration/docker-compose-python.yml b/test/integration/docker-compose-python.yml index c031f8a1d..8786f85d9 100644 --- a/test/integration/docker-compose-python.yml +++ b/test/integration/docker-compose-python.yml @@ -16,9 +16,6 @@ services: build: context: ../.. dockerfile: ./test/integration/components/beyla/Dockerfile - command: - - /beyla - - --config=/configs/instrumenter-config-java.yml volumes: - ./configs/:/configs - ./system/sys/kernel/security:/sys/kernel/security @@ -29,6 +26,7 @@ services: network_mode: "service:testserver" pid: "service:testserver" environment: + BEYLA_CONFIG: "/configs/instrumenter-config-java.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "${BEYLA_OPEN_PORT}" diff --git a/test/integration/k8s/manifests/05-instrumented-service-otel.yml b/test/integration/k8s/manifests/05-instrumented-service-otel.yml index 9acbbdb6c..a825bcf68 100644 --- a/test/integration/k8s/manifests/05-instrumented-service-otel.yml +++ b/test/integration/k8s/manifests/05-instrumented-service-otel.yml @@ -83,6 +83,8 @@ spec: - mountPath: /testoutput name: testoutput env: + - name: BEYLA_CONFIG + value: "/configs/instrumenter-config.yml" - name: GOCOVERDIR value: "/testoutput" - name: BEYLA_PRINT_TRACES diff --git a/test/integration/k8s/manifests/05-instrumented-service-prometheus.yml b/test/integration/k8s/manifests/05-instrumented-service-prometheus.yml index 94566db82..385fc34bb 100644 --- a/test/integration/k8s/manifests/05-instrumented-service-prometheus.yml +++ b/test/integration/k8s/manifests/05-instrumented-service-prometheus.yml @@ -89,13 +89,14 @@ spec: imagePullPolicy: Never # loaded into Kind from localhost securityContext: privileged: true - command: ["/beyla", "--config=/configs/instrumenter-config-promscrape.yml"] volumeMounts: - mountPath: /configs name: configs - mountPath: /testoutput name: testoutput env: + - name: BEYLA_CONFIG + value: "/configs/instrumenter-config-promscrape.yml" - name: GOCOVERDIR value: "/testoutput" - name: BEYLA_DISCOVERY_POLL_INTERVAL From 2a3f7125034e4348809e8e6c8b95ad1f41e2b264 Mon Sep 17 00:00:00 2001 From: Mario Macias Date: Mon, 15 Jan 2024 16:44:44 +0100 Subject: [PATCH 2/2] replace BEYLA_CONFIG by BEYLA_CONFIG_PATH --- cmd/beyla/main.go | 2 +- deployments/03-instrumented-app.yml | 2 +- docs/sources/configure/export-modes.md | 4 ++-- docs/sources/configure/options.md | 4 ++-- docs/sources/distributed-traces.md | 2 +- docs/sources/quickstart/cpp.md | 2 +- docs/sources/quickstart/golang.md | 2 +- docs/sources/quickstart/nodejs.md | 2 +- docs/sources/quickstart/python.md | 2 +- docs/sources/quickstart/ruby.md | 2 +- docs/sources/quickstart/rust.md | 2 +- docs/sources/setup/kubernetes.md | 4 ++-- docs/sources/tutorial/k8s-walkthrough.md | 2 +- examples/greeting-apps/docker-compose.yaml | 8 ++++---- test/integration/docker-compose-1.16.yml | 2 +- test/integration/docker-compose-java-host.yml | 2 +- test/integration/docker-compose-java-pid.yml | 2 +- test/integration/docker-compose-java-system-wide.yml | 2 +- test/integration/docker-compose-python.yml | 2 +- .../k8s/manifests/05-instrumented-service-otel.yml | 2 +- .../k8s/manifests/05-instrumented-service-prometheus.yml | 2 +- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cmd/beyla/main.go b/cmd/beyla/main.go index 22694caa0..caec00700 100644 --- a/cmd/beyla/main.go +++ b/cmd/beyla/main.go @@ -32,7 +32,7 @@ func main() { configPath := flag.String("config", "", "path to the configuration file") flag.Parse() - if cfg := os.Getenv("BEYLA_CONFIG"); cfg != "" { + if cfg := os.Getenv("BEYLA_CONFIG_PATH"); cfg != "" { configPath = &cfg } diff --git a/deployments/03-instrumented-app.yml b/deployments/03-instrumented-app.yml index 88dd6e88e..1ad0e88a9 100644 --- a/deployments/03-instrumented-app.yml +++ b/deployments/03-instrumented-app.yml @@ -64,7 +64,7 @@ spec: - mountPath: /sys/kernel/security name: system-config env: - - name: BEYLA_CONFIG + - name: BEYLA_CONFIG_PATH value: "/config/beyla-config.yml" - name: BEYLA_SERVICE_NAME value: "goblog" diff --git a/docs/sources/configure/export-modes.md b/docs/sources/configure/export-modes.md index 9bec6ec76..007a43e46 100644 --- a/docs/sources/configure/export-modes.md +++ b/docs/sources/configure/export-modes.md @@ -195,7 +195,7 @@ metrics or traces. To run the auto-instrumentation tool (previously downloaded from the [Beyla releases page](https://github.com/grafana/beyla/releases)), you will need to specify the path to the configuration YAML file, either with the -`-config` command-line argument or the `BEYLA_CONFIG` environment variable. +`-config` command-line argument or the `BEYLA_CONFIG_PATH` environment variable. For example `instrument-config.yml`: ``` @@ -203,6 +203,6 @@ beyla -config instrument-config.yml ``` or ``` -BEYLA_CONFIG=instrument-config.yml beyla +BEYLA_CONFIG_PATH=instrument-config.yml beyla ``` diff --git a/docs/sources/configure/options.md b/docs/sources/configure/options.md index 0433e8b9d..69376d25a 100644 --- a/docs/sources/configure/options.md +++ b/docs/sources/configure/options.md @@ -14,7 +14,7 @@ aliases: Beyla can be configured via environment variables or via a YAML configuration file that is passed either with the `-config` command-line -argument or the `BEYLA_CONFIG` environment variable. +argument or the `BEYLA_CONFIG_PATH` environment variable. Environment variables have priority over the properties in the configuration file. For example, in the following command line, the BEYLA_OPEN_PORT option, is used to override any open_port settings inside the config.yaml file: @@ -24,7 +24,7 @@ $ BEYLA_OPEN_PORT=8080 beyla -config /path/to/config.yaml ``` or ``` -$ BEYLA_OPEN_PORT=8080 BEYLA_CONFIG=/path/to/config.yaml beyla +$ BEYLA_OPEN_PORT=8080 BEYLA_CONFIG_PATH=/path/to/config.yaml beyla ``` diff --git a/docs/sources/distributed-traces.md b/docs/sources/distributed-traces.md index c2da22139..c21f532a6 100644 --- a/docs/sources/distributed-traces.md +++ b/docs/sources/distributed-traces.md @@ -47,7 +47,7 @@ services: beyla: image: grafana/beyla:latest environment: - BEYLA_CONFIG: "/configs/beyla-config.yml" + BEYLA_CONFIG_PATH: "/configs/beyla-config.yml" volumes: - /sys/kernel/security:/sys/kernel/security ``` diff --git a/docs/sources/quickstart/cpp.md b/docs/sources/quickstart/cpp.md index efae33554..826115047 100644 --- a/docs/sources/quickstart/cpp.md +++ b/docs/sources/quickstart/cpp.md @@ -111,7 +111,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG_PATH` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/golang.md b/docs/sources/quickstart/golang.md index a3823f9e0..2747dad72 100644 --- a/docs/sources/quickstart/golang.md +++ b/docs/sources/quickstart/golang.md @@ -122,7 +122,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG_PATH` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/nodejs.md b/docs/sources/quickstart/nodejs.md index 93f665d69..dd49396a8 100644 --- a/docs/sources/quickstart/nodejs.md +++ b/docs/sources/quickstart/nodejs.md @@ -121,7 +121,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG_PATH` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/python.md b/docs/sources/quickstart/python.md index 29df3e382..e8d8b18d4 100644 --- a/docs/sources/quickstart/python.md +++ b/docs/sources/quickstart/python.md @@ -119,7 +119,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG_PATH` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/ruby.md b/docs/sources/quickstart/ruby.md index d215c9f72..e4ab6dad0 100644 --- a/docs/sources/quickstart/ruby.md +++ b/docs/sources/quickstart/ruby.md @@ -119,7 +119,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG_PATH` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/quickstart/rust.md b/docs/sources/quickstart/rust.md index caf4804c9..92ec288e2 100644 --- a/docs/sources/quickstart/rust.md +++ b/docs/sources/quickstart/rust.md @@ -107,7 +107,7 @@ routes: unmatched: heuristic ``` -Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG` environment variable instead): +Then, run Beyla with the `-config` argument (or use the `BEYLA_CONFIG_PATH` environment variable instead): ``` sudo -E beyla -config config.yml diff --git a/docs/sources/setup/kubernetes.md b/docs/sources/setup/kubernetes.md index cd36a0dbb..accbac635 100644 --- a/docs/sources/setup/kubernetes.md +++ b/docs/sources/setup/kubernetes.md @@ -245,7 +245,7 @@ this site). To provide the configuration as a file, the recommended way is to deploy a ConfigMap with the intended configuration, then mount it into the Beyla -Pod, and refer to it with the `BEYLA_CONFIG` environment variable. +Pod, and refer to it with the `BEYLA_CONFIG_PATH` environment variable. Example of ConfigMap with the Beyla YAML documentation: @@ -304,7 +304,7 @@ spec: name: beyla-config env: # tell beyla where to find the configuration file - - name: BEYLA_CONFIG + - name: BEYLA_CONFIG_PATH value: "/config/beyla-config.yml" ``` diff --git a/docs/sources/tutorial/k8s-walkthrough.md b/docs/sources/tutorial/k8s-walkthrough.md index 64d8d1fbf..a72d57551 100644 --- a/docs/sources/tutorial/k8s-walkthrough.md +++ b/docs/sources/tutorial/k8s-walkthrough.md @@ -307,7 +307,7 @@ spec: - mountPath: /config name: beyla-config env: - - name: BEYLA_CONFIG + - name: BEYLA_CONFIG_PATH value: "/config/beyla-config.yml" - name: OTEL_EXPORTER_OTLP_ENDPOINT valueFrom: diff --git a/examples/greeting-apps/docker-compose.yaml b/examples/greeting-apps/docker-compose.yaml index fbe2132a4..884580032 100644 --- a/examples/greeting-apps/docker-compose.yaml +++ b/examples/greeting-apps/docker-compose.yaml @@ -27,7 +27,7 @@ services: network_mode: "service:nginx" pid: "service:nginx" environment: - BEYLA_CONFIG: "/configs/beyla-config.yml" + BEYLA_CONFIG_PATH: "/configs/beyla-config.yml" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "3330" BEYLA_SERVICE_NAMESPACE: "demo" @@ -57,7 +57,7 @@ services: network_mode: "service:gotestserver" pid: "service:gotestserver" environment: - BEYLA_CONFIG: "/configs/beyla-config.yml" + BEYLA_CONFIG_PATH: "/configs/beyla-config.yml" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "8080" BEYLA_SERVICE_NAMESPACE: "demo" @@ -87,7 +87,7 @@ services: network_mode: "service:javatestserver" pid: "service:javatestserver" environment: - BEYLA_CONFIG: "/configs/beyla-config.yml" + BEYLA_CONFIG_PATH: "/configs/beyla-config.yml" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "8085" BEYLA_SERVICE_NAMESPACE: "demo" @@ -117,7 +117,7 @@ services: network_mode: "service:rusttestserver" pid: "service:rusttestserver" environment: - BEYLA_CONFIG: "/configs/beyla-config.yml" + BEYLA_CONFIG_PATH: "/configs/beyla-config.yml" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "8090" BEYLA_SERVICE_NAMESPACE: "demo" diff --git a/test/integration/docker-compose-1.16.yml b/test/integration/docker-compose-1.16.yml index a9f2bfa44..5c14ddf54 100644 --- a/test/integration/docker-compose-1.16.yml +++ b/test/integration/docker-compose-1.16.yml @@ -25,7 +25,7 @@ services: privileged: true # in some environments (not GH Pull Requests) you can set it to false and then cap_add: [ SYS_ADMIN ] pid: "service:testserver" environment: - BEYLA_CONFIG: "/configs/instrumenter-config-java.yml" + BEYLA_CONFIG_PATH: "/configs/instrumenter-config-java.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: 8080 diff --git a/test/integration/docker-compose-java-host.yml b/test/integration/docker-compose-java-host.yml index 186c8a930..b461e5d49 100644 --- a/test/integration/docker-compose-java-host.yml +++ b/test/integration/docker-compose-java-host.yml @@ -22,7 +22,7 @@ services: network_mode: "host" pid: "host" environment: - BEYLA_CONFIG: "/configs/instrumenter-config-java-host.yml" + BEYLA_CONFIG_PATH: "/configs/instrumenter-config-java-host.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "${JAVA_OPEN_PORT}" diff --git a/test/integration/docker-compose-java-pid.yml b/test/integration/docker-compose-java-pid.yml index ea6bb0c0c..c7a2d2153 100644 --- a/test/integration/docker-compose-java-pid.yml +++ b/test/integration/docker-compose-java-pid.yml @@ -22,7 +22,7 @@ services: network_mode: "service:testserver" pid: "service:testserver" environment: - BEYLA_CONFIG: "/configs/instrumenter-config-java.yml" + BEYLA_CONFIG_PATH: "/configs/instrumenter-config-java.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "${JAVA_OPEN_PORT}" diff --git a/test/integration/docker-compose-java-system-wide.yml b/test/integration/docker-compose-java-system-wide.yml index 9983a06cb..44378c966 100644 --- a/test/integration/docker-compose-java-system-wide.yml +++ b/test/integration/docker-compose-java-system-wide.yml @@ -34,7 +34,7 @@ services: network_mode: "service:testserver" pid: "host" environment: - BEYLA_CONFIG: "/configs/instrumenter-config-java.yml" + BEYLA_CONFIG_PATH: "/configs/instrumenter-config-java.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "${JAVA_OPEN_PORT}" diff --git a/test/integration/docker-compose-python.yml b/test/integration/docker-compose-python.yml index 8786f85d9..567c26c6b 100644 --- a/test/integration/docker-compose-python.yml +++ b/test/integration/docker-compose-python.yml @@ -26,7 +26,7 @@ services: network_mode: "service:testserver" pid: "service:testserver" environment: - BEYLA_CONFIG: "/configs/instrumenter-config-java.yml" + BEYLA_CONFIG_PATH: "/configs/instrumenter-config-java.yml" GOCOVERDIR: "/coverage" BEYLA_PRINT_TRACES: "true" BEYLA_OPEN_PORT: "${BEYLA_OPEN_PORT}" diff --git a/test/integration/k8s/manifests/05-instrumented-service-otel.yml b/test/integration/k8s/manifests/05-instrumented-service-otel.yml index a825bcf68..890b49040 100644 --- a/test/integration/k8s/manifests/05-instrumented-service-otel.yml +++ b/test/integration/k8s/manifests/05-instrumented-service-otel.yml @@ -83,7 +83,7 @@ spec: - mountPath: /testoutput name: testoutput env: - - name: BEYLA_CONFIG + - name: BEYLA_CONFIG_PATH value: "/configs/instrumenter-config.yml" - name: GOCOVERDIR value: "/testoutput" diff --git a/test/integration/k8s/manifests/05-instrumented-service-prometheus.yml b/test/integration/k8s/manifests/05-instrumented-service-prometheus.yml index 385fc34bb..9d8d7cbfb 100644 --- a/test/integration/k8s/manifests/05-instrumented-service-prometheus.yml +++ b/test/integration/k8s/manifests/05-instrumented-service-prometheus.yml @@ -95,7 +95,7 @@ spec: - mountPath: /testoutput name: testoutput env: - - name: BEYLA_CONFIG + - name: BEYLA_CONFIG_PATH value: "/configs/instrumenter-config-promscrape.yml" - name: GOCOVERDIR value: "/testoutput"