otel: revert HTTP transport, keep gRPC

The HTTP/protobuf exporter never sent any traffic in prod (tcpdump
on port 4318 showed nothing) despite the receiver path being correct
and the bridge wiring being intact (logs reached journalctl via the
stdout exporter). Likely the BatchLogProcessor + reqwest-client combo
isn't getting the right runtime context, but debugging that on a live
deployment isn't worth holding up the rest of the speedups.

Restoring grpc-tonic transport so prod observability comes back. The
remaining build-time wins on this branch (mold linker, system sqlite3,
profile.dev tweaks, lockfile-only dep refresh) deliver most of the
original savings without touching telemetry. Operator: revert
OTLP_OTLS_ENDPOINT in prod from port 4318 back to 4317.

HTTP transport remains a viable follow-up — needs to be debugged
against a local SigNoz instance with internal SDK error visibility
enabled, on its own branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cameron Cordes
2026-05-06 18:33:37 -04:00
parent f73db58771
commit ecd49fd053
3 changed files with 31 additions and 5 deletions

26
Cargo.lock generated
View File

@@ -1826,6 +1826,19 @@ dependencies = [
"tower-service", "tower-service",
] ]
[[package]]
name = "hyper-timeout"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0"
dependencies = [
"hyper",
"hyper-util",
"pin-project-lite",
"tokio",
"tower-service",
]
[[package]] [[package]]
name = "hyper-tls" name = "hyper-tls"
version = "0.6.0" version = "0.6.0"
@@ -2732,6 +2745,9 @@ dependencies = [
"prost", "prost",
"reqwest", "reqwest",
"thiserror 2.0.18", "thiserror 2.0.18",
"tokio",
"tonic",
"tracing",
] ]
[[package]] [[package]]
@@ -3377,6 +3393,7 @@ dependencies = [
"base64", "base64",
"bytes", "bytes",
"encoding_rs", "encoding_rs",
"futures-channel",
"futures-core", "futures-core",
"futures-util", "futures-util",
"h2 0.4.14", "h2 0.4.14",
@@ -4162,10 +4179,15 @@ dependencies = [
"http 1.4.0", "http 1.4.0",
"http-body", "http-body",
"http-body-util", "http-body-util",
"hyper",
"hyper-timeout",
"hyper-util",
"percent-encoding", "percent-encoding",
"pin-project", "pin-project",
"sync_wrapper", "sync_wrapper",
"tokio",
"tokio-stream", "tokio-stream",
"tower",
"tower-layer", "tower-layer",
"tower-service", "tower-service",
"tracing", "tracing",
@@ -4190,11 +4212,15 @@ checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"
dependencies = [ dependencies = [
"futures-core", "futures-core",
"futures-util", "futures-util",
"indexmap",
"pin-project-lite", "pin-project-lite",
"slab",
"sync_wrapper", "sync_wrapper",
"tokio", "tokio",
"tokio-util",
"tower-layer", "tower-layer",
"tower-service", "tower-service",
"tracing",
] ]
[[package]] [[package]]

View File

@@ -44,9 +44,9 @@ prometheus = "0.13"
lazy_static = "1.5" lazy_static = "1.5"
anyhow = "1.0" anyhow = "1.0"
rand = "0.8.5" rand = "0.8.5"
opentelemetry = { version = "0.31.0", features = ["metrics", "trace"] } opentelemetry = { version = "0.31.0", features = ["default", "metrics", "tracing"] }
opentelemetry_sdk = { version = "0.31.0", features = ["rt-tokio-current-thread", "metrics", "logs"] } opentelemetry_sdk = { version = "0.31.0", features = ["default", "rt-tokio-current-thread", "metrics"] }
opentelemetry-otlp = { version = "0.31.0", default-features = false, features = ["trace", "metrics", "logs", "http-proto", "reqwest-client"] } opentelemetry-otlp = { version = "0.31.0", features = ["default", "metrics", "tracing", "grpc-tonic"] }
opentelemetry-stdout = "0.31.0" opentelemetry-stdout = "0.31.0"
opentelemetry-appender-log = "0.31.0" opentelemetry-appender-log = "0.31.0"
tempfile = "3.20.0" tempfile = "3.20.0"

View File

@@ -24,7 +24,7 @@ pub fn init_tracing() {
.build(); .build();
let span_exporter = opentelemetry_otlp::SpanExporter::builder() let span_exporter = opentelemetry_otlp::SpanExporter::builder()
.with_http() .with_tonic()
.with_endpoint(std::env::var("OTLP_OTLS_ENDPOINT").unwrap()) .with_endpoint(std::env::var("OTLP_OTLS_ENDPOINT").unwrap())
.build() .build()
.unwrap(); .unwrap();
@@ -40,7 +40,7 @@ pub fn init_tracing() {
#[allow(dead_code)] #[allow(dead_code)]
pub fn init_logs() { pub fn init_logs() {
let otlp_exporter = opentelemetry_otlp::LogExporter::builder() let otlp_exporter = opentelemetry_otlp::LogExporter::builder()
.with_http() .with_tonic()
.with_endpoint(std::env::var("OTLP_OTLS_ENDPOINT").unwrap()) .with_endpoint(std::env::var("OTLP_OTLS_ENDPOINT").unwrap())
.build() .build()
.unwrap(); .unwrap();