import { CloudSandboxTaskCreationPath } from "../../../../../platform/agentHost/common/cloudSandboxAgentHost.js"; import { CloudSandboxLifecycleTelemetry, CloudSandboxRefreshStopReason } from "./cloudSandboxLifecycleTelemetry.js"; import { CloudSandboxRequestAction, CloudSandboxRequestOutcome, ICloudSandboxDiscoveryTelemetryData, CloudSandboxConnectionOutcome, ICloudSandboxSessionFeedTelemetryData, CloudSandboxConnectionStage, CloudSandboxConnectionSurface, CloudSandboxConnectionSource, CloudSandboxConnectionContext, ICloudSandboxConnectionTelemetry } from "./cloudSandboxTelemetry.js"; export declare const ICloudSandboxTelemetryService: import("../../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Telemetry for the cloud sandbox integration. * * Owns every event the sandbox path emits so the reporting rules — what is aggregated, which values * are closed sets, what must never carry a URL or token — live in one place instead of being * restated at each call site. New sandbox events belong here as additional methods. */ export interface ICloudSandboxTelemetryService { readonly _serviceBrand: undefined; readonly lifecycle: CloudSandboxLifecycleTelemetry; /** * Record how a Mission Control request ended. * * Cheap to call on every request: outcomes are accumulated and reported periodically rather than * sent individually, because a single connect can fan out to tens of calls through waking retries * and readiness polls. */ reportRequest(action: CloudSandboxRequestAction, outcome: CloudSandboxRequestOutcome): void; /** Reports one completed discovery attempt, including partial, failed and cancelled scans. */ reportDiscovery(data: ICloudSandboxDiscoveryTelemetryData): void; /** Report client-observed task/VM provisioning separately from connecting to the returned environment. */ reportProvisioningOutcome(outcome: CloudSandboxConnectionOutcome, durationMs: number, taskCreationPath?: CloudSandboxTaskCreationPath): void; /** Report a permanent rejection or exhausted credential retry budget; token expiry does not close an established socket. */ reportCredentialRefreshStopped(reason: CloudSandboxRefreshStopReason, consecutiveFailures: number, error?: unknown): void; /** Report a session feed transition: connections after a gap, failed attempts with their retry delay, and give-ups that leave the window on discovery polling. */ reportSessionFeed(data: ICloudSandboxSessionFeedTelemetryData): void; /** Track a logical connection; aggregate metrics stay separate from ID-correlated lifecycle observations. */ trackConnection(stage: CloudSandboxConnectionStage, surface?: CloudSandboxConnectionSurface, source?: CloudSandboxConnectionSource, context?: CloudSandboxConnectionContext): ICloudSandboxConnectionTelemetry; }