mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: expose application name via Appearance API (#9886)
This commit is contained in:
@@ -293,6 +293,13 @@ func (m metricsStore) GetAppSecurityKey(ctx context.Context) (string, error) {
|
||||
return key, err
|
||||
}
|
||||
|
||||
func (m metricsStore) GetApplicationName(ctx context.Context) (string, error) {
|
||||
start := time.Now()
|
||||
r0, r1 := m.s.GetApplicationName(ctx)
|
||||
m.queryLatencies.WithLabelValues("GetApplicationName").Observe(time.Since(start).Seconds())
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
func (m metricsStore) GetAuditLogsOffset(ctx context.Context, arg database.GetAuditLogsOffsetParams) ([]database.GetAuditLogsOffsetRow, error) {
|
||||
start := time.Now()
|
||||
rows, err := m.s.GetAuditLogsOffset(ctx, arg)
|
||||
@@ -1761,6 +1768,13 @@ func (m metricsStore) UpsertAppSecurityKey(ctx context.Context, value string) er
|
||||
return r0
|
||||
}
|
||||
|
||||
func (m metricsStore) UpsertApplicationName(ctx context.Context, value string) error {
|
||||
start := time.Now()
|
||||
r0 := m.s.UpsertApplicationName(ctx, value)
|
||||
m.queryLatencies.WithLabelValues("UpsertApplicationName").Observe(time.Since(start).Seconds())
|
||||
return r0
|
||||
}
|
||||
|
||||
func (m metricsStore) UpsertDefaultProxy(ctx context.Context, arg database.UpsertDefaultProxyParams) error {
|
||||
start := time.Now()
|
||||
r0 := m.s.UpsertDefaultProxy(ctx, arg)
|
||||
|
||||
Reference in New Issue
Block a user