From d73643960910e4eedc083a6a522b52b24bc6c8a7 Mon Sep 17 00:00:00 2001 From: Calin Martinconi Date: Mon, 11 May 2026 13:03:32 +0300 Subject: [PATCH 1/3] feat(config): support new bee OTLP tracing flags --- config/config.yaml | 2 +- config/staging.yaml | 2 +- config/testnet-bee-playground.yaml | 2 +- pkg/config/bee.go | 4 +++- pkg/orchestration/k8s/helpers.go | 4 +++- pkg/orchestration/node.go | 4 +++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index 6d90d4f23..c89796d89 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -124,7 +124,7 @@ bee-configs: swap-factory-address: "0xdD661f2500bA5831e3d1FEbAc379Ea1bF80773Ac" swap-initial-deposit: 500000000000000000 tracing-enabled: true - tracing-endpoint: "10.10.11.199:6831" + tracing-otlp-endpoint: "10.10.11.199:4318" tracing-service-name: "bee" verbosity: 5 # 1=error, 2=warn, 3=info, 4=debug, 5=trace warmup-time: 0s diff --git a/config/staging.yaml b/config/staging.yaml index 9345579ae..ea4ece9e8 100644 --- a/config/staging.yaml +++ b/config/staging.yaml @@ -42,7 +42,7 @@ bee-configs: password: "beekeeper" swap-enable: true tracing-enabled: true - tracing-endpoint: "10.10.11.199:6831" + tracing-otlp-endpoint: "10.10.11.199:4318" tracing-service-name: "bee" verbosity: 4 welcome-message: Welcome to the bee staging environment created by Beekeeper! diff --git a/config/testnet-bee-playground.yaml b/config/testnet-bee-playground.yaml index 4ef4f645a..6143e5de6 100644 --- a/config/testnet-bee-playground.yaml +++ b/config/testnet-bee-playground.yaml @@ -69,7 +69,7 @@ bee-configs: swap-enable: true swap-initial-deposit: 0 tracing-enabled: false - tracing-endpoint: "10.10.11.199:6831" + tracing-otlp-endpoint: "10.10.11.199:4318" tracing-service-name: "bee-playground" verbosity: 5 warmup-time: 5m0s diff --git a/pkg/config/bee.go b/pkg/config/bee.go index 343664794..c058bc66a 100644 --- a/pkg/config/bee.go +++ b/pkg/config/bee.go @@ -58,7 +58,9 @@ type BeeConfig struct { SwapFactoryAddress *string `yaml:"swap-factory-address"` SwapInitialDeposit *uint64 `yaml:"swap-initial-deposit"` TracingEnabled *bool `yaml:"tracing-enabled"` - TracingEndpoint *string `yaml:"tracing-endpoint"` + TracingOTLPEndpoint *string `yaml:"tracing-otlp-endpoint"` + TracingOTLPInsecure *bool `yaml:"tracing-otlp-insecure"` + TracingSamplingRatio *float64 `yaml:"tracing-sampling-ratio"` TracingServiceName *string `yaml:"tracing-service-name"` Verbosity *uint64 `yaml:"verbosity"` WarmupTime *time.Duration `yaml:"warmup-time"` diff --git a/pkg/orchestration/k8s/helpers.go b/pkg/orchestration/k8s/helpers.go index e763be697..aff01cef7 100644 --- a/pkg/orchestration/k8s/helpers.go +++ b/pkg/orchestration/k8s/helpers.go @@ -56,7 +56,9 @@ swap-enable: {{.SwapEnable}} swap-factory-address: {{.SwapFactoryAddress}} swap-initial-deposit: {{.SwapInitialDeposit}} tracing-enable: {{.TracingEnabled}} -tracing-endpoint: {{.TracingEndpoint}} +tracing-otlp-endpoint: {{.TracingOTLPEndpoint}} +tracing-otlp-insecure: {{.TracingOTLPInsecure}} +tracing-sampling-ratio: {{.TracingSamplingRatio}} tracing-service-name: {{.TracingServiceName}} verbosity: {{.Verbosity}} warmup-time: {{.WarmupTime}} diff --git a/pkg/orchestration/node.go b/pkg/orchestration/node.go index 20bdce748..c235d55c3 100644 --- a/pkg/orchestration/node.go +++ b/pkg/orchestration/node.go @@ -116,7 +116,9 @@ type Config struct { SwapFactoryAddress string // swap factory address SwapInitialDeposit uint64 // initial deposit if deploying a new chequebook TracingEnabled bool // enable tracing - TracingEndpoint string // endpoint to send tracing data + TracingOTLPEndpoint string // OTLP/HTTP endpoint for tracing data (host:port) + TracingOTLPInsecure bool // disable TLS for the OTLP exporter + TracingSamplingRatio float64 // head-based sampling ratio in [0,1]; 1 samples everything TracingServiceName string // service name identifier for tracing Verbosity uint64 // log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace WarmupTime time.Duration // warmup time pull/pushsync protocols From 68a12f9157069f9efeea2bfe5a888a5b373fbdb4 Mon Sep 17 00:00:00 2001 From: Calin Martinconi Date: Tue, 12 May 2026 22:20:13 +0300 Subject: [PATCH 2/3] =?UTF-8?q?fix(tracing):=20address=20PR=20review=20?= =?UTF-8?q?=E2=80=94=20protocol=20flag,=20sampling=200,=20nested=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/config/bee.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/config/bee.go b/pkg/config/bee.go index c058bc66a..bddaa8151 100644 --- a/pkg/config/bee.go +++ b/pkg/config/bee.go @@ -100,5 +100,13 @@ func (b *BeeConfig) Export() (config orchestration.Config) { config.BlockchainRPCEndpoint = *b.SwapEndpoint } + // Bee's tracing-sampling-ratio semantics: 0 disables sampling, 1 samples + // everything. Default to 1 when unset so existing beekeeper configs (which + // never specified the key) keep the prior "sample everything" behavior + // rather than silently turning tracing off. + if b.TracingSamplingRatio == nil { + config.TracingSamplingRatio = 1.0 + } + return config } From 579ca71a49ba60d9d8bda9da130358e2fafdb812 Mon Sep 17 00:00:00 2001 From: Calin Martinconi Date: Thu, 28 May 2026 14:26:47 +0300 Subject: [PATCH 3/3] feat(config): add tracing-otlp-protocol flag with bee-aligned defaults Add TracingOTLPProtocol to BeeConfig and the orchestration Config, emit it in the k8s config template, and default TracingOTLPInsecure to true and TracingOTLPProtocol to http in Export() to mirror bee's OTLP defaults so exporters can opt into grpc. --- pkg/config/bee.go | 12 ++++++++++++ pkg/orchestration/k8s/helpers.go | 1 + pkg/orchestration/node.go | 1 + 3 files changed, 14 insertions(+) diff --git a/pkg/config/bee.go b/pkg/config/bee.go index bddaa8151..f7e2f1724 100644 --- a/pkg/config/bee.go +++ b/pkg/config/bee.go @@ -60,6 +60,7 @@ type BeeConfig struct { TracingEnabled *bool `yaml:"tracing-enabled"` TracingOTLPEndpoint *string `yaml:"tracing-otlp-endpoint"` TracingOTLPInsecure *bool `yaml:"tracing-otlp-insecure"` + TracingOTLPProtocol *string `yaml:"tracing-otlp-protocol"` TracingSamplingRatio *float64 `yaml:"tracing-sampling-ratio"` TracingServiceName *string `yaml:"tracing-service-name"` Verbosity *uint64 `yaml:"verbosity"` @@ -108,5 +109,16 @@ func (b *BeeConfig) Export() (config orchestration.Config) { config.TracingSamplingRatio = 1.0 } + // Mirror bee's OTLP defaults: insecure transport (suitable for a local + // collector) over HTTP. The k8s config template always emits these keys, + // so leaving them at Go zero values would override bee's own defaults with + // insecure=false and an empty protocol. + if b.TracingOTLPInsecure == nil { + config.TracingOTLPInsecure = true + } + if b.TracingOTLPProtocol == nil { + config.TracingOTLPProtocol = "http" + } + return config } diff --git a/pkg/orchestration/k8s/helpers.go b/pkg/orchestration/k8s/helpers.go index aff01cef7..009780d75 100644 --- a/pkg/orchestration/k8s/helpers.go +++ b/pkg/orchestration/k8s/helpers.go @@ -58,6 +58,7 @@ swap-initial-deposit: {{.SwapInitialDeposit}} tracing-enable: {{.TracingEnabled}} tracing-otlp-endpoint: {{.TracingOTLPEndpoint}} tracing-otlp-insecure: {{.TracingOTLPInsecure}} +tracing-otlp-protocol: {{.TracingOTLPProtocol}} tracing-sampling-ratio: {{.TracingSamplingRatio}} tracing-service-name: {{.TracingServiceName}} verbosity: {{.Verbosity}} diff --git a/pkg/orchestration/node.go b/pkg/orchestration/node.go index c235d55c3..bb3cd5a7f 100644 --- a/pkg/orchestration/node.go +++ b/pkg/orchestration/node.go @@ -118,6 +118,7 @@ type Config struct { TracingEnabled bool // enable tracing TracingOTLPEndpoint string // OTLP/HTTP endpoint for tracing data (host:port) TracingOTLPInsecure bool // disable TLS for the OTLP exporter + TracingOTLPProtocol string // OTLP transport protocol: http or grpc TracingSamplingRatio float64 // head-based sampling ratio in [0,1]; 1 samples everything TracingServiceName string // service name identifier for tracing Verbosity uint64 // log verbosity level 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=trace