Skip to content

Commit b8fdc6b

Browse files
committed
refactor(otel): unify compute driver tracing
Centralize compute-driver RPC descriptors, stream instrumentation, provider routing, and standalone installation in openshell-otel. Use typed RPC constants so gateway and in-process driver paths cannot panic on unknown operation strings or repeat runtime method parsing. Emit semantic-convention rpc.service and rpc.method attributes, preserve trace context and resource identity across deployment modes, and route both RPC boundary and backend crate spans to each selected driver provider. Leave consumer-dropped watch spans unset while recording observed terminal status, and avoid reboxing untraced external-driver streams. Derive each driver tracing identity from Cargo package and crate metadata and attach its descriptor to the compute-driver registration, keeping provider selection and target routing tied to the registered implementation. Share tracing setup and round-trip test support across Docker, Podman, Kubernetes, and VM, and update the gateway tracing documentation. Signed-off-by: Kris Hicks <khicks@nvidia.com>
1 parent c27a3a3 commit b8fdc6b

29 files changed

Lines changed: 1901 additions & 1833 deletions

File tree

‎Cargo.lock‎

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎architecture/gateway.md‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,22 @@ identity and configured compute driver.
745745

746746
The gateway forwards OTLP configuration, its configured gateway name, and W3C
747747
trace context to managed external drivers. Built-in drivers use dedicated
748-
in-process providers that preserve the same RPC trace boundary. Each driver
748+
in-process providers that preserve the same RPC trace boundary. A shared
749+
compute-driver tracing descriptor derives provider layers and standalone
750+
installation from each driver's service identity, and routes both the shared
751+
RPC boundary target and that driver's crate target prefix. A shared RPC tracer
752+
owns unary and streaming boundary outcomes. Each driver
749753
exports to the configured collector under its own service name and carries the
750-
gateway name as a resource attribute.
754+
gateway name and configured compute driver as resource attributes.
755+
Compute-driver client and server spans share the fully qualified protobuf
756+
operation name, such as `openshell.compute.v1.ComputeDriver/CreateSandbox`,
757+
in both the span name and `rpc.method`; the current RPC semantic conventions
758+
integrate the service into that fully qualified method and do not emit
759+
`rpc.service`. `service.name` and span kind distinguish the two sides.
760+
Backend-prefixed spans describe implementation work beneath that boundary.
761+
Streaming `WatchSandboxes` spans remain open for the stream lifetime on both
762+
sides. A terminal stream status records its outcome;
763+
consumer teardown without a terminal status leaves the span status unset.
751764

752765
Two invariants shape the failure behavior. Telemetry is diagnostic, so no OTLP
753766
failure stops the gateway from serving: a malformed endpoint is logged at

0 commit comments

Comments
 (0)