Repository navigation
Commit f5784ab
committed
feat(observability): supervisor OTLP telemetry relay
Add an OTLP relay to the sandbox supervisor that accepts agent-emitted
traces on 127.0.0.1:4318, enriches spans with sandbox resource attributes,
and forwards them to the gateway over the existing session protocol.
The relay enables zero-config observability for OTel-instrumented agents
inside network-isolated sandboxes. Agents export to the standard OTLP
endpoint; the supervisor handles enrichment, buffering, and forwarding
without requiring egress policy exceptions.
Key components:
- OTLP HTTP receiver (protobuf + JSON) with per-driver binding (netns
for Docker/Podman, direct for K8s/VM)
- Span enrichment with sandbox identity (sandbox_id, workspace_id,
policy, user, image, driver) and telemetry source marker
- Bounded buffer (4096 slots) with non-blocking try_send forwarding
- Gateway-side TelemetryRelayExporter with dedicated gRPC client that
preserves supervisor-enriched resource attributes
- Capability negotiation: supervisor advertises telemetry_relay, gateway
confirms only when OTLP export is configured
- Graceful shutdown ordering: relay drains before network teardown
Proto: TelemetryData message, capabilities on SupervisorHello and
SessionAccepted.
Closes: NVIDIA#2641
Signed-off-by: Roland Huß <[email protected]>1 parent 592df3e commit f5784ab
30 files changed
Lines changed: 2156 additions & 1571 deletions
File tree
- architecture
- crates
- openshell-core/src
- openshell-driver-kubernetes/src
- openshell-driver-podman/src
- openshell-ocsf/src
- tracing_layers
- openshell-otel/src
- openshell-sandbox/src
- openshell-server
- src
- openshell-supervisor-network
- src
- otlp
- openshell-supervisor-process/src
- proto
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
465 | 531 | | |
466 | 532 | | |
467 | 533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
238 | 250 | | |
239 | 251 | | |
240 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4341 | 4341 | | |
4342 | 4342 | | |
4343 | 4343 | | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
| 4353 | + | |
4344 | 4354 | | |
4345 | 4355 | | |
4346 | 4356 | | |
| |||
0 commit comments