mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add telemetry support for workspace agent subsystem (#7579)
This commit is contained in:
@@ -544,8 +544,9 @@ func (c *Client) PostLifecycle(ctx context.Context, req PostLifecycleRequest) er
|
||||
}
|
||||
|
||||
type PostStartupRequest struct {
|
||||
Version string `json:"version"`
|
||||
ExpandedDirectory string `json:"expanded_directory"`
|
||||
Version string `json:"version"`
|
||||
ExpandedDirectory string `json:"expanded_directory"`
|
||||
Subsystem codersdk.AgentSubsystem `json:"subsystem"`
|
||||
}
|
||||
|
||||
func (c *Client) PostStartup(ctx context.Context, req PostStartupRequest) error {
|
||||
|
||||
@@ -130,9 +130,10 @@ type WorkspaceAgent struct {
|
||||
// LoginBeforeReady if true, the agent will delay logins until it is ready (e.g. executing startup script has ended).
|
||||
LoginBeforeReady bool `json:"login_before_ready"`
|
||||
// StartupScriptTimeoutSeconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout.
|
||||
StartupScriptTimeoutSeconds int32 `json:"startup_script_timeout_seconds"`
|
||||
ShutdownScript string `json:"shutdown_script,omitempty"`
|
||||
ShutdownScriptTimeoutSeconds int32 `json:"shutdown_script_timeout_seconds"`
|
||||
StartupScriptTimeoutSeconds int32 `json:"startup_script_timeout_seconds"`
|
||||
ShutdownScript string `json:"shutdown_script,omitempty"`
|
||||
ShutdownScriptTimeoutSeconds int32 `json:"shutdown_script_timeout_seconds"`
|
||||
Subsystem AgentSubsystem `json:"subsystem"`
|
||||
}
|
||||
|
||||
type DERPRegion struct {
|
||||
@@ -553,3 +554,9 @@ type WorkspaceAgentStartupLog struct {
|
||||
Output string `json:"output"`
|
||||
Level LogLevel `json:"level"`
|
||||
}
|
||||
|
||||
type AgentSubsystem string
|
||||
|
||||
const (
|
||||
AgentSubsystemEnvbox AgentSubsystem = "envbox"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user