Traces
Traces show how the gateway handles each request, including the compute-driver work it performs, and how each sandbox supervisor starts up. Use them to find where time goes in an operation such as sandbox creation, or to follow one request across the gateway and its compute driver.
Enable Traces
Set an OTLP collector endpoint in gateway.toml:
In the Helm chart, set the table under gatewayConfig. The gateway passes the endpoint to the compute drivers and sandbox supervisors it starts, and supervisors connect to the collector directly, so it must be reachable from sandboxes too. For a separate trace collector, TLS, sampling, and the other settings, refer to OTLP Export.
What Is Traced
Spans for routine or high-volume operations use DEBUG level, and the default INFO level does not export them. These include store operations, health checks, the RPCs that supervisors call on a timer (GetSandboxConfig and ReportProviderReadiness), and how supervisors handle egress connections. Set the gateway or sandbox log level to debug to include them.
Span Names
Each component names its spans after the operation it performs:
The gateway’s client span and the driver’s server span for a compute-driver call share the same name, which also appears in rpc.method. Their service names and span kinds tell them apart. A driver watch stream records a terminal status when it observes one. If the gateway stops consuming the stream first, the span status stays unset.
Resource Attributes
Resource attributes identify which process produced a span:
To override the gateway’s service.name, set service_name under [openshell.gateway.otlp]. Compute-driver and supervisor service names are fixed. To add your own attributes, such as deployment.environment, set OTEL_RESOURCE_ATTRIBUTES in the gateway’s environment.
Gateway Names
The gateway name comes from name under [openshell.gateway], the --name flag, or OPENSHELL_GATEWAY_NAME, and defaults to openshell. The Helm chart sets it with server.name, which defaults to the chart’s full name.
Give each installation that reports to the same collector its own name, including each high-availability deployment, so that you can tell their spans apart. The replicas of one installation share its name.
Trace Context
The gateway continues a valid W3C traceparent sent by the caller, so a client’s trace can include the gateway’s spans for its requests. Without one, the gateway starts a new trace.
The gateway also passes its trace context to compute drivers, so driver spans appear in the same trace as the gateway request that caused them. Built-in drivers export their spans through the gateway’s process. Managed external drivers receive the trace endpoint, gateway name, and compute driver from the gateway. Drivers that you run yourself own their telemetry configuration.
Next Steps
- Configure OTLP export, including sampling and the
OTEL_*variables the gateway honors. - See the Observability Overview for the other signals OpenShell produces.