Skip to content

feat: add telemetry support for workspace agent subsystem #7579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move column to workspace_agents table
  • Loading branch information
sreya committed May 17, 2023
commit 9ca40fcf8dea696e5e89a08538cc81f5f95066ce
2 changes: 1 addition & 1 deletion agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ func (a *agent) run(ctx context.Context) error {
err = a.client.PostStartup(ctx, agentsdk.PostStartupRequest{
Version: buildinfo.Version(),
ExpandedDirectory: manifest.Directory,
Subsystem: a.subsystem,
})
if err != nil {
return xerrors.Errorf("update workspace agent version: %w", err)
Expand Down Expand Up @@ -1180,7 +1181,6 @@ func (a *agent) startReportingConnectionStats(ctx context.Context) {
stats := &agentsdk.Stats{
ConnectionCount: int64(len(networkStats)),
ConnectionsByProto: map[string]int64{},
Subsystem: a.subsystem,
}
for conn, counts := range networkStats {
stats.ConnectionsByProto[conn.Proto.String()]++
Expand Down
4 changes: 2 additions & 2 deletions coderd/database/dump.sql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BEGIN;
CREATE TYPE workspace_agent_subsystem AS ENUM ('envbuilder', 'envbox', 'none');
ALTER TABLE workspace_agent_stats ADD COLUMN subsystem workspace_agent_subsystem NOT NULL default 'none';
ALTER TABLE workspace_agents ADD COLUMN subsystem workspace_agent_subsystem NOT NULL default 'none';
COMMIT;
38 changes: 19 additions & 19 deletions coderd/database/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading