You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0890eee
Browse filesBrowse the repository at this point in the historyBrowse files
fix(observability): bind OTLP receiver on capability confirmation
The supervisor bound the OTLP receiver on 127.0.0.1:4318 before the
session handshake, regardless of whether the gateway confirmed the
otel_export capability. When the capability was declined the port stayed
reserved and the receiver answered 200 OK for spans that were then dropped
on the way to a session that never drained them. Shutdown could also hang:
each HTTP connection task held a buffer sender and the forwarder only
exited once the last sender dropped, so a single keep-alive connection
blocked sandbox teardown.
Move the relay into openshell-supervisor-process and make the supervisor
session own it. The session binds the receiver on the first SessionAccepted
that confirms otel_export, keeps it across reconnects, and drains the
buffer straight into the session stream. This removes the forwarder task
and the intermediate session channel, leaving one bounded buffer between
receiver and gateway.
The receiver now tracks connections in a JoinSet under hyper-util's
GracefulShutdown with a header read timeout, so shutdown disables
keep-alive, waits a bounded 2s for in-flight requests, and aborts
stragglers. run_process asks the session to stop the receiver and flush
buffered telemetry after the entrypoint exits and before the exit is
reported, bounded at 3s, so final spans still reach the gateway. The
previous lib.rs drain ran after the session task had been aborted and
flushed into a channel nobody read.
Also drop the never-read RelayConfig.enabled field, factor the netns bind
into bind_tcp_in_netns_fd, and update the architecture doc.
Signed-off-by: Roland Huß <rhuss@redhat.com>
0 commit comments