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

Method GetTemplateAppInsights

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

GetTemplateAppInsights returns the aggregate usage of each app in a given timeframe. The result can be filtered on template_ids, meaning only user data from workspaces based on those templates will be included.

(ctx context.Context, arg GetTemplateAppInsightsParams)

Source from the content-addressed store, hash-verified

693 // timeframe. The result can be filtered on template_ids, meaning only user data
694 // from workspaces based on those templates will be included.
695 GetTemplateAppInsights(ctx context.Context, arg GetTemplateAppInsightsParams) ([]GetTemplateAppInsightsRow, error)
696 // GetTemplateAppInsightsByTemplate is used for Prometheus metrics. Keep
697 // in sync with GetTemplateAppInsights and UpsertTemplateUsageStats.
698 GetTemplateAppInsightsByTemplate(ctx context.Context, arg GetTemplateAppInsightsByTemplateParams) ([]GetTemplateAppInsightsByTemplateRow, error)

Callers 4

insightsTemplatesMethod · 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