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

Function newStatsReportFromSignedToken

coderd/workspaceapps/stats.go:37–48  ·  view source on GitHub ↗
(token SignedToken)

Source from the content-addressed store, hash-verified

35}
36
37func newStatsReportFromSignedToken(token SignedToken) StatsReport {
38 return StatsReport{
39 UserID: token.UserID,
40 WorkspaceID: token.WorkspaceID,
41 AgentID: token.AgentID,
42 AccessMethod: token.AccessMethod,
43 SlugOrPort: token.AppSlugOrPort,
44 SessionID: uuid.New(),
45 SessionStartedAt: dbtime.Now(),
46 Requests: 1,
47 }
48}
49
50// StatsReporter reports workspace app StatsReports.
51type StatsReporter interface {

Callers 2

proxyWorkspaceAppMethod · 0.85
workspaceAgentPTYMethod · 0.85

Calls 2

NowFunction · 0.92
NewMethod · 0.65

Tested by

no test coverage detected