Skip to content

Commit 6d88a7c

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 f68867b commit 6d88a7c

29 files changed

Lines changed: 1887 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: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,21 @@ identity and configured compute driver.
735735

736736
The gateway forwards OTLP configuration, its configured gateway name, and W3C
737737
trace context to managed external drivers. Built-in drivers use dedicated
738-
in-process providers that preserve the same RPC trace boundary. Each driver
738+
in-process providers that preserve the same RPC trace boundary. A shared
739+
compute-driver tracing descriptor derives provider layers and standalone
740+
installation from each driver's service identity, and routes both the shared
741+
RPC boundary target and that driver's crate target prefix. A shared RPC tracer
742+
owns unary and streaming boundary outcomes. Each driver
739743
exports to the configured collector under its own service name and carries the
740-
gateway name as a resource attribute.
744+
gateway name and configured compute driver as resource attributes.
745+
Compute-driver client and server spans share the fully qualified protobuf
746+
operation name, such as `openshell.compute.v1.ComputeDriver/CreateSandbox`,
747+
while `rpc.service` carries `openshell.compute.v1.ComputeDriver` and
748+
`rpc.method` carries the bare method name. `service.name` and span kind
749+
distinguish the two sides. Backend-prefixed spans describe implementation work
750+
beneath that boundary. Streaming `WatchSandboxes` spans remain open for the
751+
stream lifetime on both sides. A terminal stream status records its outcome;
752+
consumer teardown without a terminal status leaves the span status unset.
741753

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

0 commit comments

Comments
 (0)