Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea19217

Browse files
committed
refactor: improve metrics description and labels
1 parent 73af00e commit ea19217

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

coderd/prometheusmetrics/prometheusmetrics.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func Workspaces(ctx context.Context, logger slog.Logger, registerer prometheus.R
170170
Namespace: "coderd",
171171
Subsystem: "api",
172172
Name: "workspace_creation_total",
173-
Help: "Total regular workspace (without prebuild) creations by organization, template and preset.",
173+
Help: "Total regular (non-prebuilt) workspace creations by organization, template, and preset.",
174174
},
175175
[]string{"organization_name", "template_name", "preset_name"},
176176
)
@@ -182,7 +182,7 @@ func Workspaces(ctx context.Context, logger slog.Logger, registerer prometheus.R
182182
Namespace: "coderd",
183183
Subsystem: "provisionerd",
184184
Name: "workspace_creation_duration_seconds",
185-
Help: "Time to create a workspace (regular or prebuild).",
185+
Help: "Time to create a workspace by organization, template, preset, and type (regular or prebuild).",
186186
Buckets: []float64{
187187
1, // 1s
188188
10,
@@ -201,7 +201,7 @@ func Workspaces(ctx context.Context, logger slog.Logger, registerer prometheus.R
201201
// Treat tiny values as zero (helps with noisy near-zero latencies).
202202
NativeHistogramZeroThreshold: 0,
203203
NativeHistogramMaxZeroThreshold: 0,
204-
}, []string{"organization_name", "template_name", "preset_name", "source"})
204+
}, []string{"organization_name", "template_name", "preset_name", "type"})
205205
if err := registerer.Register(workspaceCreationTimings); err != nil {
206206
return nil, nil, err
207207
}
@@ -210,7 +210,7 @@ func Workspaces(ctx context.Context, logger slog.Logger, registerer prometheus.R
210210
Namespace: "coderd",
211211
Subsystem: "provisionerd",
212212
Name: "workspace_claim_duration_seconds",
213-
Help: "Time to claim a prebuilt workspace.",
213+
Help: "Time to claim a prebuilt workspace by organization, template, and preset.",
214214
Buckets: []float64{
215215
1, // 1s
216216
10,

0 commit comments

Comments
 (0)