Documentation ¶
Index ¶
- Constants
- Variables
- func ClientId(ctx context.Context) string
- func NewBuildRunnerEventProps(ctx context.Context, buildId, buildState string) map[string]interface{}
- func NewWorkspaceEventProps(ctx context.Context, workspace *workspace.Workspace, ...) map[string]interface{}
- func ServerId(ctx context.Context) string
- func SessionId(ctx context.Context) string
- func TelemetryEnabled(ctx context.Context) bool
- type AbstractTelemetryService
- type BuildRunnerEvent
- type CliEvent
- type ServerEvent
- type TelemetryContextKey
- type TelemetryService
- type TelemetrySource
Constants ¶
View Source
const CLIENT_ID_HEADER = "X-Daytona-Client-Id"
View Source
const ENABLED_HEADER = "X-Daytona-Telemetry-Enabled"
View Source
const SESSION_ID_HEADER = "X-Daytona-Session-Id"
View Source
const SOURCE_HEADER = "X-Daytona-Source"
Variables ¶
View Source
var AdditionalData map[string]interface{} = map[string]interface{}{}
Functions ¶
func NewBuildRunnerEventProps ¶ added in v0.25.0
func NewWorkspaceEventProps ¶
func TelemetryEnabled ¶
Types ¶
type AbstractTelemetryService ¶
type AbstractTelemetryService struct { TelemetryService // contains filtered or unexported fields }
func NewAbstractTelemetryService ¶
func NewAbstractTelemetryService(version string) *AbstractTelemetryService
func (*AbstractTelemetryService) SetCommonProps ¶
func (t *AbstractTelemetryService) SetCommonProps(properties map[string]interface{})
type BuildRunnerEvent ¶ added in v0.26.0
type BuildRunnerEvent string
const ( // Purge events BuildRunnerEventPurgeStarted BuildRunnerEvent = "build_runner_purge_started" BuildRunnerEventPurgeCompleted BuildRunnerEvent = "build_runner_purge_completed" BuildRunnerEventPurgeError BuildRunnerEvent = "build_runner_purge_error" // Build events BuildRunnerEventRunBuild BuildRunnerEvent = "build_runner_run_build" BuildRunnerEventRunBuildError BuildRunnerEvent = "build_runner_run_build_error" )
type ServerEvent ¶
type ServerEvent string
const ( ServerEventApiRequestStarted ServerEvent = "server_api_request_started" ServerEventApiResponseSent ServerEvent = "server_api_response_sent" ServerEventPurgeStarted ServerEvent = "server_purge_started" ServerEventPurgeCompleted ServerEvent = "server_purge_completed" ServerEventPurgeError ServerEvent = "server_purge_error" // Workspace events ServerEventWorkspaceCreated ServerEvent = "server_workspace_created" ServerEventWorkspaceDestroyed ServerEvent = "server_workspace_destroyed" ServerEventWorkspaceStarted ServerEvent = "server_workspace_started" ServerEventWorkspaceStopped ServerEvent = "server_workspace_stopped" ServerEventWorkspaceCreateError ServerEvent = "server_workspace_created_error" ServerEventWorkspaceDestroyError ServerEvent = "server_workspace_destroyed_error" ServerEventWorkspaceStartError ServerEvent = "server_workspace_started_error" ServerEventWorkspaceStopError ServerEvent = "server_workspace_stopped_error" )
type TelemetryContextKey ¶
type TelemetryContextKey string
var ( ENABLED_CONTEXT_KEY TelemetryContextKey = "telemetry-enabled" CLIENT_ID_CONTEXT_KEY TelemetryContextKey = "cli-id" SESSION_ID_CONTEXT_KEY TelemetryContextKey = "session-id" SERVER_ID_CONTEXT_KEY TelemetryContextKey = "server-id" )
type TelemetryService ¶
type TelemetryService interface { io.Closer TrackCliEvent(event CliEvent, clientId string, properties map[string]interface{}) error TrackServerEvent(event ServerEvent, clientId string, properties map[string]interface{}) error TrackBuildRunnerEvent(event BuildRunnerEvent, clientId string, properties map[string]interface{}) error SetCommonProps(properties map[string]interface{}) }
type TelemetrySource ¶
type TelemetrySource string
var ( CLI_SOURCE TelemetrySource = "cli" CLI_PROJECT_SOURCE TelemetrySource = "cli-project" AGENT_SOURCE TelemetrySource = "agent" )
Click to show internal directories.
Click to hide internal directories.