Conversation
Instead of requiring OTEL_EXPORTER_OTLP_ENDPOINT on every CLI invocation, CLI spans now flow through the server's existing RPC connection. The server re-exports received spans to its configured OTLP collector. Three-layer design: - pkg/otelproxy: implements otlptrace.Client, serializes spans to OTLP protobuf, sends via RPC. Errors are swallowed so tracing never blocks. - api/telemetry + servers/telemetry: new Telemetry.reportSpans(bytes) RPC endpoint. Server HTTP POSTs opaque protobuf bytes to the collector. - cli/commands/deploy.go: sets up proxy tracing automatically via the RPC connection. No client-side config needed.
📝 WalkthroughWalkthroughThis pull request introduces a server-assisted distributed tracing architecture. New IDL and generated RPC bindings define a Telemetry interface with a reportSpans method. A new telemetry server implementation reads OTLP configuration from environment variables and forwards span data to a remote OTLP endpoint. An RPC proxy client enables CLI commands to export traces through this server instead of directly. The telemetry service is integrated into the coordinator and exposed over RPC at path dev.miren.runtime/telemetry. Dependencies for OTLP modules are updated, and the deploy command now uses the proxy-based tracing setup. No actionable comments were generated in the recent review. 🎉 Comment |

Summary
OTEL_EXPORTER_OTLP_ENDPOINTneeded on the client sideTelemetry.reportSpans(bytes)RPC endpoint receives serialized OTLP protobuf and forwards it to the server's configured collectorDesign
Three layers, all simple:
pkg/otelproxy/proxy.gootlptrace.Client, marshals spans to protobuf, sends via RPCapi/telemetry/+servers/telemetry/server.go{OTEL_EXPORTER_OTLP_ENDPOINT}/v1/tracescli/commands/deploy.goThe proxy client lives in
pkg/otelproxy/(notpkg/rpc/) to avoid an import cycle through the generated telemetry RPC code.Test plan
go generate ./api/telemetry/...succeedsmake bin/mirenbuilds cleanmake lintpasses (0 issues)make testpasses (3287 tests, 20 pre-existing skips)OTEL_EXPORTER_OTLP_ENDPOINTpointed at a collector, runm deploywithout any env vars on the CLI side, verify deploy+build spans appear in the collector