Skip to content

Commit

Permalink
Phone home: send build hash (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
nablaone authored May 22, 2024
1 parent 1f76278 commit 6557a89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker/clean-clickhouse/schema/05-phone-home-data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ CREATE TABLE IF NOT EXISTS "phone_home_data"

"config_mode" Nullable(String),
"top_errors" Array(String),
"build_hash" Nullable(String),
)
ENGINE = MergeTree
ORDER BY ("@timestamp")
Expand Down
2 changes: 2 additions & 0 deletions quesma/telemetry/phone_home.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ type PhoneHomeStats struct {
AgentStartedAt int64 `json:"started_at"`
Hostname string `json:"hostname"`
QuesmaVersion string `json:"quesma_version"`
BuildHash string `json:"build_hash"`
InstanceID string `json:"instanceId"`

// add more stats here about running
Expand Down Expand Up @@ -451,6 +452,7 @@ func (a *agent) collect(ctx context.Context, reportType string) (stats PhoneHome
stats.AgentStartedAt = a.statedAt.Unix()
stats.TakenAt = time.Now().Unix()
stats.QuesmaVersion = buildinfo.Version
stats.BuildHash = buildinfo.BuildHash
stats.NumberOfPanics = recovery.PanicCounter.Load()
stats.InstanceID = a.instanceId

Expand Down

0 comments on commit 6557a89

Please sign in to comment.