Skip to content

Commit 1c2da22

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 43ca62e commit 1c2da22

30 files changed

Lines changed: 1936 additions & 1905 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
@@ -756,9 +756,22 @@ identity and configured compute driver.
756756

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

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

0 commit comments

Comments
 (0)