MCPcopy Index your code
hub / github.com/coder/coder / GetTelemetryTaskEvents

Method GetTelemetryTaskEvents

coderd/database/querier.go:691–691  ·  view source on GitHub ↗

Returns all data needed to build task lifecycle events for telemetry in a single round-trip. For each task whose workspace is in the given set, fetches: - the latest workspace app binding (task_workspace_apps) - the most recent stop and start builds (workspace_builds) - the last "working" app status

(ctx context.Context, arg GetTelemetryTaskEventsParams)

Source from the content-addressed store, hash-verified

689 // because each resume cycle provisions a new app ID. This ensures
690 // pre-pause statuses contribute to idle duration and active duration.
691 GetTelemetryTaskEvents(ctx context.Context, arg GetTelemetryTaskEventsParams) ([]GetTelemetryTaskEventsRow, error)
692 // GetTemplateAppInsights returns the aggregate usage of each app in a given
693 // timeframe. The result can be filtered on template_ids, meaning only user data
694 // from workspaces based on those templates will be included.

Callers 4

CollectTaskEventsFunction · 0.65
TestTemplateMethod · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 1

TestTemplateMethod · 0.52