Skip to content

Commit fdce6ef

Browse files
authored
feat(supervisor): relay agent OTLP traces to the collector (NVIDIA#4276)
* feat(supervisor): relay agent OTLP traces to the collector Serve the reserved endpoint 192.0.0.8:4318 inside the supervisor, attribute each batch with openshell.sandbox.id and openshell.telemetry.source=agent at the protobuf wire level, buffer it with fixed bounds, and forward it over OTLP/gRPC to the collector the supervisor already uses, flushing before the exit report and keeping the relay up for exec sessions. Signed-off-by: Roland Huß <[email protected]> * refactor(supervisor): let the OTLP relay exporter take a prepared channel Expose Exporter::with_channel as the seam for a collector transport built once in openshell-otel and shared by the gateway, the supervisor's own spans, and the relay. Exporter::new keeps building the plaintext channel for now. Signed-off-by: Roland Huß <[email protected]> * feat(sandbox): leave caller-set OTLP endpoints alone Inject the relay variables only when the sandbox creation request names no OTLP endpoint, generic or traces-specific. A caller who names one has chosen where the agent exports; overwriting it would silently redirect an agent that deliberately exports elsewhere. A protocol or compression setting alone does not suppress injection. Applies to both spawn paths and to exec children, with the docs updated to match. Signed-off-by: Roland Huß <[email protected]> * fix(supervisor): address OTLP relay review feedback Inject only the generic OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_PROTOCOL as lowest-precedence defaults, and only while the relay is active. The supervisor now starts the relay before attach and signals it to the sandbox runtime through AgentSpec::otlp_relay_active. An endpoint in the creation request, the image ENV, or an exec environment suppresses the defaults, and a provider-supplied traces endpoint is removed. Harden the relay itself: - skip the exit flush and shutdown wait when the last export failed - count batches still pending on Drop as discarded and log them - validate the collector endpoint with the shared openshell-otel helper - accept Content-Encoding: identity - fix the 413 and shutdown 503 messages and the memory bound docs - narrow the attribution claim to resource attributes Document best-effort delivery and the 404 for metrics and logs. Signed-off-by: Roland Huß <[email protected]> * feat(supervisor): gate the agent trace relay behind [otlp.agent] The relay started whenever a sandbox supervisor had a trace endpoint, so enabling gateway trace export also changed every workload's environment. Make it opt-in: `[openshell.gateway.otlp.agent]` with `enabled = true` turns it on, and its optional `endpoint` falls back to the shared `[openshell.gateway.otlp]` endpoint, like the OCSF table. The gateway validates the endpoint and drivers pass it to supervisors as OPENSHELL_OTLP_AGENT_ENDPOINT, separate from OPENSHELL_OTLP_ENDPOINT. Docker, Podman (including the Podman Machine host alias), Kubernetes and VM drivers carry it, in-process and as standalone binaries. The shared Kubernetes supervisor still does not relay. The relay now acknowledges OTLP metrics and logs exports with an empty success and discards them, so agent SDKs that export every signal to the generic endpoint stop retrying. Discards are counted and logged once. Local dev gateway tasks, the Skaffold values and the e2e harness enable the table; OPENSHELL_E2E_OTLP_AGENT=0 runs the inert case with trace export still on. Signed-off-by: Roland Huß <[email protected]> * docs(supervisor): describe the agent trace relay architecture Add an "Agent traces" section to the architecture page and document the relay in the crate READMEs: the reserved-destination hook in the network supervisor, the OTEL defaults the sandbox runtime injects, and how the Docker, Podman, Kubernetes, and VM drivers pass the agent endpoint. Signed-off-by: Roland Huß <[email protected]> * fix(sandbox): disable OTLP compression in the relay env and cover exec children The relay refuses compressed bodies, so an image or creation request that sets gzip compression without naming an endpoint received the relay default and lost every trace export to a 415. The relay default now also sets OTEL_EXPORTER_OTLP_COMPRESSION and OTEL_EXPORTER_OTLP_TRACES_COMPRESSION to none, as NVIDIA#4275 asks. Boundary exec children start from a cleared environment and never see the image ENV, yet the relay default was suppressed when the sandbox's own environment named an endpoint, which left exec children with no endpoint at all. apply_otlp_relay_env now takes a ChildEnvironment so only children that inherit the sandbox environment consult it. Add a probe test for both TLS environment modes together with the relay default, now that the mode-aware TLS layering lives in compose_canonical_process_environment, and describe the whole composition at its call sites. Signed-off-by: Roland Huß <[email protected]> * fix(supervisor): flush the agent trace relay before suspending The suspend lifecycle from NVIDIA#4765 returned without shutting the relay down, so Drop discarded batches the relay had already acknowledged to the agent, which does not resend them after resume. Shut the relay down, bounded by FLUSH_TIMEOUT, once the workload is frozen and before networking is dropped. Also tidy what the rebases left behind: drop a stray blank line inside the upstream startup block, rename SandboxInstanceConfig::agent_otlp_endpoint to otlp_agent_endpoint to match every other identifier, serialize the OCSF table through the generic serialize_enabled, correct the UnsupportedScheme doc comment (the supervisor's own exporter does speak TLS), and build the reserved-destination proxy test identities with host-native paths. Signed-off-by: Roland Huß <[email protected]> * test(e2e): scope the Podman OTLP default and restore upstream lockfiles The Podman wrapper enabled OTLP export and the agent relay for every e2e run, including single-target CI jobs such as additional_ca. Enable it only for the full suite or a selection that includes otlp_relay, following the SPIFFE fixture pattern; the Docker wrapper stays opt-in. The e2e and features lockfiles had downgraded libsqlite3-sys, crossbeam-queue and hybrid-array against upstream with no manifest change requiring it. Restore upstream's lockfiles and add only the packages the new e2e dependencies pull in. Signed-off-by: Roland Huß <[email protected]> --------- Signed-off-by: Roland Huß <[email protected]>
1 parent a137abb commit fdce6ef

69 files changed

Lines changed: 7417 additions & 179 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/helm-dev-environment/SKILL.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@ trace-context annotation. The same command exposes OTLP/gRPC on
269269
`http://127.0.0.1:4317` and, when deployed, the Kubernetes gateway on
270270
`http://127.0.0.1:8090`. The local `gateway:docker`, `gateway:podman`, and
271271
`gateway:vm` tasks detect the collector listener at startup and enable trace
272-
export only while it is reachable.
272+
export, OCSF log export, and the agent trace relay only while it is reachable.
273+
Spans an agent exports from inside a sandbox arrive through the supervisor's
274+
relay with `openshell.telemetry.source=agent` and share `openshell.sandbox.id`
275+
with that sandbox's supervisor spans.
273276

274277
The Skaffold profile for HA reverse-proxy development is available from
275278
`deploy/helm/openshell/`:

‎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.

‎Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ tracing-appender = "0.2"
7171

7272
# OpenTelemetry — OTLP/gRPC export. Kept in lockstep with the workspace's
7373
# tonic 0.14 / prost 0.14 via opentelemetry-proto's `grpc-tonic` feature.
74+
opentelemetry-proto = { version = "0.32", default-features = false, features = ["gen-tonic", "trace"] }
7475
opentelemetry = "0.32"
7576
opentelemetry_sdk = { version = "0.32", features = ["rt-tokio"] }
7677
opentelemetry-otlp = { version = "0.32", default-features = false, features = ["grpc-tonic", "gzip-tonic", "tls-aws-lc", "tls-roots", "trace"] }

‎crates/openshell-core/src/sandbox_env.rs‎

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ pub const OTLP_ENDPOINT: &str = "OPENSHELL_OTLP_ENDPOINT";
3232
/// OTLP/gRPC collector endpoint for supervisor OCSF event export.
3333
pub const OTLP_OCSF_ENDPOINT: &str = "OPENSHELL_OTLP_OCSF_ENDPOINT";
3434

35+
/// OTLP/gRPC collector endpoint that supervisors relay workload traces to.
36+
///
37+
/// Set only when the gateway enables `[openshell.gateway.otlp.agent]`; absent
38+
/// keeps the relay inactive and leaves the workload environment unchanged.
39+
pub const OTLP_AGENT_ENDPOINT: &str = "OPENSHELL_OTLP_AGENT_ENDPOINT";
40+
3541
/// OCSF schema version that supervisors downgrade exported events to.
3642
pub const OTLP_OCSF_SCHEMA_VERSION: &str = "OPENSHELL_OTLP_OCSF_SCHEMA_VERSION";
3743

@@ -299,11 +305,88 @@ pub const DEFAULT_SANDBOX_GID: u32 = 1000;
299305
/// OCI only for the former contract.
300306
pub const OCI_IMAGE_USER: &str = "OPENSHELL_OCI_IMAGE_USER";
301307

308+
/// Standard OpenTelemetry environment variable for the OTLP exporter endpoint.
309+
///
310+
/// While the supervisor serves the OTLP relay, the sandbox runtime sets it in
311+
/// workload processes to [`OTLP_RELAY_ENDPOINT`] as a lowest-precedence
312+
/// default, so agent SDKs export to the relay without configuration. It is
313+
/// not set when the creation request, the image, or a per-exec environment
314+
/// names an endpoint, generic or traces-specific, and any signal-specific
315+
/// endpoint the workload sets later takes precedence over it in the SDK.
316+
pub const OTEL_EXPORTER_OTLP_ENDPOINT: &str = "OTEL_EXPORTER_OTLP_ENDPOINT";
317+
318+
/// Standard OpenTelemetry environment variable for the OTLP exporter protocol.
319+
///
320+
/// Set to `http/protobuf` alongside [`OTEL_EXPORTER_OTLP_ENDPOINT`].
321+
pub const OTEL_EXPORTER_OTLP_PROTOCOL: &str = "OTEL_EXPORTER_OTLP_PROTOCOL";
322+
323+
/// Signal-specific endpoint variable. Never injected; a layer that sets it
324+
/// has chosen where traces go, so the relay default is left out.
325+
pub const OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: &str = "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT";
326+
327+
/// Standard OpenTelemetry environment variable for OTLP exporter compression.
328+
///
329+
/// Set to `none` alongside [`OTEL_EXPORTER_OTLP_ENDPOINT`], because the
330+
/// relay refuses compressed bodies.
331+
pub const OTEL_EXPORTER_OTLP_COMPRESSION: &str = "OTEL_EXPORTER_OTLP_COMPRESSION";
332+
333+
/// Signal-specific compression variable, also set to `none` with the relay
334+
/// default.
335+
///
336+
/// SDKs prefer it over [`OTEL_EXPORTER_OTLP_COMPRESSION`], so a `gzip` value
337+
/// from the image or the creation request would otherwise still compress
338+
/// every trace export.
339+
pub const OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: &str = "OTEL_EXPORTER_OTLP_TRACES_COMPRESSION";
340+
341+
/// Reserved destination agent processes export OTLP to.
342+
///
343+
/// This address is never routed. A workload `connect()` to any non-loopback
344+
/// address is intercepted by the sandbox seccomp broker and staged for the
345+
/// supervisor, which recognises this destination and serves the OTLP
346+
/// receiver on the staged stream itself instead of dialing upstream. So the
347+
/// value is a label the supervisor switches on, and it must stay outside
348+
/// loopback (loopback connects complete locally without mediation) and
349+
/// outside `198.18.0.0/15`, which the policy DNS runtime uses for synthetic
350+
/// answers. `192.0.0.8` is the IPv4 dummy address (RFC 7600): reserved,
351+
/// unroutable, and never assigned to a real service.
352+
pub const OTLP_RELAY_ADDR: &str = "192.0.0.8:4318";
353+
354+
/// [`OTLP_RELAY_ADDR`] as the URL injected through
355+
/// [`OTEL_EXPORTER_OTLP_ENDPOINT`].
356+
pub const OTLP_RELAY_ENDPOINT: &str = "http://192.0.0.8:4318";
357+
302358
// The corporate upstream-proxy configuration deliberately has no reserved
303359
// environment variables: it travels on the supervisor's argv
304360
// (`--upstream-proxy` and friends), which a sandbox image cannot forge the
305361
// way it could bake `ENV` values.
306362

363+
#[cfg(test)]
364+
mod otlp_relay_address_tests {
365+
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
366+
367+
use super::{OTLP_RELAY_ADDR, OTLP_RELAY_ENDPOINT};
368+
369+
#[test]
370+
fn relay_address_is_an_unroutable_non_loopback_label() {
371+
let addr: SocketAddr = OTLP_RELAY_ADDR.parse().expect("relay address parses");
372+
assert_eq!(addr.port(), 4318, "OTLP HTTP default port");
373+
let IpAddr::V4(ip) = addr.ip() else {
374+
panic!("relay address must be IPv4");
375+
};
376+
assert!(
377+
!ip.is_loopback(),
378+
"loopback would bypass seccomp mediation and never reach the supervisor"
379+
);
380+
assert_eq!(ip, Ipv4Addr::new(192, 0, 0, 8), "RFC 7600 dummy address");
381+
let [a, b, ..] = ip.octets();
382+
assert!(
383+
!(a == 198 && (b == 18 || b == 19)),
384+
"198.18.0.0/15 is the policy DNS synthetic answer pool"
385+
);
386+
assert_eq!(OTLP_RELAY_ENDPOINT, format!("http://{OTLP_RELAY_ADDR}"));
387+
}
388+
}
389+
307390
#[cfg(test)]
308391
mod tests {
309392
use super::*;

‎crates/openshell-driver-docker/README.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ When the gateway configures `[openshell.gateway.otlp]`, the in-process driver
1111
exports spans to the same OTLP/gRPC collector as
1212
`openshell-driver-docker`. The standalone driver accepts
1313
`OPENSHELL_OTLP_ENDPOINT`, continues W3C trace context from gateway RPC
14-
metadata, and flushes spans during graceful shutdown.
14+
metadata, and flushes spans during graceful shutdown. When
15+
`[openshell.gateway.otlp.agent]` is enabled, the driver also sets
16+
`OPENSHELL_OTLP_AGENT_ENDPOINT` on the supervisor container, which starts the
17+
agent trace relay. The standalone driver takes that endpoint as
18+
`--otlp-agent-endpoint`.
1519

1620
## Runtime Model
1721

‎crates/openshell-driver-docker/src/lib.rs‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ pub struct DockerComputeConfig {
216216
#[serde(skip)]
217217
pub supervisor_ocsf_export: Option<openshell_core::sandbox_env::OcsfOtlpExport>,
218218

219+
/// OTLP/gRPC collector that supervisors relay workload traces to. The
220+
/// gateway supplies it from `[otlp.agent]`; driver TOML cannot set it.
221+
#[serde(skip)]
222+
pub supervisor_otlp_agent_endpoint: Option<String>,
223+
219224
/// Gateway name passed to supervisors for their telemetry. The gateway
220225
/// supplies its own name; driver TOML cannot set it.
221226
#[serde(skip)]
@@ -323,6 +328,7 @@ impl Default for DockerComputeConfig {
323328
supervisor_network_mode: DockerSupervisorNetworkMode::Host,
324329
host_gateway_ip: None,
325330
supervisor_ocsf_export: None,
331+
supervisor_otlp_agent_endpoint: None,
326332
supervisor_gateway_name: None,
327333
sandbox_runtime_image: None,
328334
supervisor_bin: None,
@@ -364,6 +370,7 @@ struct DockerDriverRuntimeConfig {
364370
bridge_default_endpoint: Option<String>,
365371
host_gateway_ip: Option<IpAddr>,
366372
supervisor_ocsf_export: Option<openshell_core::sandbox_env::OcsfOtlpExport>,
373+
supervisor_otlp_agent_endpoint: Option<String>,
367374
supervisor_gateway_name: Option<String>,
368375
ssh_socket_path: String,
369376
guest_tls: Option<DockerGuestTlsPaths>,
@@ -1026,6 +1033,9 @@ impl DockerComputeDriver {
10261033
bridge_default_endpoint,
10271034
host_gateway_ip,
10281035
supervisor_ocsf_export: docker_config.supervisor_ocsf_export.clone(),
1036+
supervisor_otlp_agent_endpoint: docker_config
1037+
.supervisor_otlp_agent_endpoint
1038+
.clone(),
10291039
supervisor_gateway_name: docker_config.supervisor_gateway_name.clone(),
10301040
ssh_socket_path: docker_config.ssh_socket_path.clone(),
10311041
guest_tls,
@@ -5951,7 +5961,8 @@ fn docker_child_environment(sandbox: &DriverSandbox) -> HashMap<String, String>
59515961
}
59525962

59535963
/// Environment that lets the supervisor export spans, joining the current
5954-
/// trace, and OCSF events, identifying the gateway that launched it.
5964+
/// trace, OCSF events, and relayed workload traces, identifying the gateway
5965+
/// that launched it.
59555966
fn supervisor_otlp_environment(config: &DockerDriverRuntimeConfig) -> Vec<String> {
59565967
let traces = config.supervisor_otlp_endpoint.iter().flat_map(|endpoint| {
59575968
std::iter::once((openshell_core::sandbox_env::OTLP_ENDPOINT, endpoint.clone()))
@@ -5961,12 +5972,22 @@ fn supervisor_otlp_environment(config: &DockerDriverRuntimeConfig) -> Vec<String
59615972
.supervisor_ocsf_export
59625973
.iter()
59635974
.flat_map(openshell_core::sandbox_env::OcsfOtlpExport::environment);
5975+
let agent = config
5976+
.supervisor_otlp_agent_endpoint
5977+
.iter()
5978+
.map(|endpoint| {
5979+
(
5980+
openshell_core::sandbox_env::OTLP_AGENT_ENDPOINT,
5981+
endpoint.clone(),
5982+
)
5983+
});
59645984
let gateway_name = config
59655985
.supervisor_gateway_name
59665986
.iter()
59675987
.map(|name| (openshell_core::sandbox_env::GATEWAY_NAME, name.clone()));
59685988
traces
59695989
.chain(ocsf)
5990+
.chain(agent)
59705991
.chain(gateway_name)
59715992
.map(|(name, value)| format!("{name}={value}"))
59725993
.collect()

‎crates/openshell-driver-docker/src/main.rs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ struct Args {
5959
)]
6060
otlp_ocsf_schema_version: Option<String>,
6161

62+
/// OTLP/gRPC collector endpoint that supervisors relay workload traces
63+
/// to. Absent keeps the agent trace relay off.
64+
#[arg(long, env = "OPENSHELL_OTLP_AGENT_ENDPOINT")]
65+
otlp_agent_endpoint: Option<String>,
66+
6267
#[arg(long, env = "OPENSHELL_GATEWAY_NAME")]
6368
gateway_name: Option<String>,
6469
}
@@ -90,6 +95,7 @@ async fn main() -> Result<()> {
9095
docker_config.supervisor_image = Some(image);
9196
}
9297
docker_config.supervisor_otlp_endpoint = args.otlp_endpoint.clone();
98+
docker_config.supervisor_otlp_agent_endpoint = args.otlp_agent_endpoint.clone();
9399
docker_config.supervisor_gateway_name = args.gateway_name.clone();
94100
docker_config.supervisor_ocsf_export = args.otlp_ocsf_endpoint.clone().map(|endpoint| {
95101
openshell_core::sandbox_env::OcsfOtlpExport {

‎crates/openshell-driver-docker/src/tests.rs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ fn runtime_config() -> DockerDriverRuntimeConfig {
330330
bridge_default_endpoint: Some("https://host.docker.internal:8443".to_string()),
331331
host_gateway_ip: None,
332332
supervisor_ocsf_export: None,
333+
supervisor_otlp_agent_endpoint: None,
333334
supervisor_gateway_name: None,
334335
ssh_socket_path: openshell_core::container_paths::SSH_SOCKET_PATH.to_string(),
335336
guest_tls: Some(DockerGuestTlsPaths {
@@ -1516,7 +1517,8 @@ fn docker_child_environment_strips_supervisor_control_keys() {
15161517
#[test]
15171518
fn supervisor_otlp_environment_carries_only_configured_signals() {
15181519
use openshell_core::sandbox_env::{
1519-
GATEWAY_NAME, OTLP_ENDPOINT, OTLP_OCSF_ENDPOINT, OTLP_OCSF_SCHEMA_VERSION, OcsfOtlpExport,
1520+
GATEWAY_NAME, OTLP_AGENT_ENDPOINT, OTLP_ENDPOINT, OTLP_OCSF_ENDPOINT,
1521+
OTLP_OCSF_SCHEMA_VERSION, OcsfOtlpExport,
15201522
};
15211523

15221524
let mut config = runtime_config();
@@ -1541,6 +1543,13 @@ fn supervisor_otlp_environment_carries_only_configured_signals() {
15411543
]
15421544
);
15431545

1546+
config.supervisor_ocsf_export = None;
1547+
config.supervisor_otlp_agent_endpoint = Some("http://agents:4317".to_string());
1548+
assert_eq!(
1549+
supervisor_otlp_environment(&config),
1550+
[format!("{OTLP_AGENT_ENDPOINT}=http://agents:4317")]
1551+
);
1552+
15441553
config.supervisor_gateway_name = Some("prod-west".to_string());
15451554
assert_eq!(
15461555
supervisor_otlp_environment(&config).last(),

‎crates/openshell-driver-kubernetes/README.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ When the gateway exports OTLP traces, the driver sets
9191
`OPENSHELL_OTLP_ENDPOINT` on the supervisor Pod to the gateway's endpoint and
9292
`TRACEPARENT` to the trace context of the operation that created the Pod. The
9393
supervisor exports its spans there and parents its startup span on that
94-
context. The endpoint is not configurable in driver TOML.
94+
context. When `[openshell.gateway.otlp.agent]` is enabled, the driver also
95+
sets `OPENSHELL_OTLP_AGENT_ENDPOINT`, which starts the supervisor's agent trace
96+
relay. Neither endpoint is configurable in driver TOML.
9597

9698
The driver creates one namespace-wide `NetworkPolicy` before it releases any
9799
workload Pod. It selects every OpenShell workload, denies all workload egress,
@@ -257,8 +259,9 @@ fails closed.
257259

258260
The topology does not support upstream proxies or provider SPIFFE identity, and
259261
the shared supervisor is a single point of failure for the sandboxes it hosts.
260-
Shared sandbox instances export no supervisor OTLP traces or OCSF events; the driver
261-
warns at startup when the gateway configures that export.
262+
Shared sandbox instances export no supervisor OTLP traces or OCSF events and do
263+
not relay agent traces; the driver warns at startup when the gateway configures
264+
any of them.
262265
When the setting is removed, reconciliation suspends shared generations, and a
263266
restart creates the dedicated generation's boundary Service the shared one never
264267
had.

‎crates/openshell-driver-kubernetes/src/config.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,10 @@ pub struct KubernetesComputeConfig {
372372
/// export; driver TOML cannot set it.
373373
#[serde(skip)]
374374
pub supervisor_ocsf_export: Option<openshell_core::sandbox_env::OcsfOtlpExport>,
375+
/// OTLP/gRPC collector that supervisors relay workload traces to. The
376+
/// gateway supplies it from `[otlp.agent]`; driver TOML cannot set it.
377+
#[serde(skip)]
378+
pub supervisor_otlp_agent_endpoint: Option<String>,
375379

376380
/// Gateway name passed to supervisors for their telemetry. The gateway
377381
/// supplies its own name; driver TOML cannot set it.
@@ -502,6 +506,7 @@ impl Default for KubernetesComputeConfig {
502506
grpc_endpoint: String::new(),
503507
supervisor_otlp_endpoint: None,
504508
supervisor_ocsf_export: None,
509+
supervisor_otlp_agent_endpoint: None,
505510
supervisor_gateway_name: None,
506511
ssh_socket_path: openshell_core::container_paths::SSH_SOCKET_PATH.to_string(),
507512
client_tls_secret_name: String::new(),

0 commit comments

Comments
 (0)