@@ -25,6 +25,7 @@ import (
25
25
"github.com/prometheus/client_golang/prometheus"
26
26
httpSwagger "github.com/swaggo/http-swagger/v2"
27
27
"go.opentelemetry.io/otel/trace"
28
+ "golang.org/x/exp/slices"
28
29
"golang.org/x/xerrors"
29
30
"google.golang.org/api/idtoken"
30
31
"storj.io/drpc/drpcmux"
@@ -407,24 +408,30 @@ func New(options *Options) *API {
407
408
408
409
if options .HealthcheckFunc == nil {
409
410
options .HealthcheckFunc = func (ctx context.Context , apiKey string ) * healthcheck.Report {
411
+ dismissedHealthchecks := loadDismissedHealthcheck (ctx , options .Database , options .Logger )
410
412
return healthcheck .Run (ctx , & healthcheck.ReportOptions {
411
413
Database : healthcheck.DatabaseReportOptions {
412
414
DB : options .Database ,
413
415
Threshold : options .DeploymentValues .Healthcheck .ThresholdDatabase .Value (),
416
+ Dismissed : slices .Contains (dismissedHealthchecks , healthcheck .SectionDatabase ),
414
417
},
415
418
Websocket : healthcheck.WebsocketReportOptions {
416
419
AccessURL : options .AccessURL ,
417
420
APIKey : apiKey ,
421
+ Dismissed : slices .Contains (dismissedHealthchecks , healthcheck .SectionWebsocket ),
418
422
},
419
423
AccessURL : healthcheck.AccessURLReportOptions {
420
424
AccessURL : options .AccessURL ,
425
+ Dismissed : slices .Contains (dismissedHealthchecks , healthcheck .SectionAccessURL ),
421
426
},
422
427
DerpHealth : derphealth.ReportOptions {
423
- DERPMap : api .DERPMap (),
428
+ DERPMap : api .DERPMap (),
429
+ Dismissed : slices .Contains (dismissedHealthchecks , healthcheck .SectionDERP ),
424
430
},
425
431
WorkspaceProxy : healthcheck.WorkspaceProxyReportOptions {
426
432
CurrentVersion : buildinfo .Version (),
427
433
WorkspaceProxiesFetchUpdater : * (options .WorkspaceProxiesFetchUpdater ).Load (),
434
+ Dismissed : slices .Contains (dismissedHealthchecks , healthcheck .SectionWorkspaceProxy ),
428
435
},
429
436
})
430
437
}
0 commit comments