Skip to content

chore(spawn-docker, spawn-local-platform): extend TelemetryRecorder plumbing to Docker sessions and LocalMachine - #58

Merged
deer merged 1 commit into
mainfrom
inject_telemetry
Aug 6, 2026
Merged

chore(spawn-docker, spawn-local-platform): extend TelemetryRecorder plumbing to Docker sessions and LocalMachine#58
deer merged 1 commit into
mainfrom
inject_telemetry

Conversation

@deer

@deer deer commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

The base-telemetry migration in a prior commit added TelemetryRecorder support to the core platform types, but the Docker session hierarchy and LocalMachine still only recorded telemetry via a hardcoded SystemTelemetryRecorder, and BuildImage/GetSystemEvents constructed a default JsonNodeInputStreamProcessor that wrote straight to System.out/System.err instead of routing through an injectable recorder.

This change adds a TelemetryRecorderFactory-accepting constructor alongside the existing no-arg-telemetry constructor on AbstractSession, TCPSocketBasedSession, and UnixDomainSocketBasedSession, and threads an @Inject-ed TelemetryRecorderFactory field through DockerHostVariableBasedSessionFactory, InternalDockerHostBasedSessionFactory, LocalHostBasedSessionFactory, and UnixDomainSocketBasedSession.Factory so each produces sessions bound to the caller-supplied recorder. Sessions.factories and Sessions.createSession gained overloads that accept a TelemetryRecorderFactory and bind it into the discovery Context, defaulting to SystemTelemetryRecorder::of when omitted. AbstractCommand now exposes a recorder() accessor backed by an injected TelemetryRecorder, and BuildImage/GetSystemEvents pass it into JsonNodeInputStreamProcessor instead of relying on its default constructor. LocalMachine gained a matching TelemetryRecorderFactory-accepting constructor that forwards to AbstractTemplatedPlatform.

spawn-docker's module-info.java and pom.xml now declare base-telemetry and base-telemetry-foundation dependencies, and spawn-local-platform picks up base-telemetry-foundation for the same reason.

@deer
deer merged commit 1a859e8 into main Aug 6, 2026
1 check passed
@deer
deer deleted the inject_telemetry branch August 6, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant