mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 16:30:17 +02:00
healthcheck: only report transitions (#5068)
This commit is contained in:
parent
1aa062b37b
commit
deb6f67094
5 changed files with 207 additions and 5 deletions
|
@ -6,14 +6,11 @@ import (
|
|||
"github.com/pomerium/pomerium/pkg/health"
|
||||
)
|
||||
|
||||
// sourceAttr is to indicate the source of this health check is not host specific
|
||||
var sourceAttr = health.StrAttr("source", "pomerium-managed-core")
|
||||
|
||||
func (c *service) ReportBundleAppliedSuccess(
|
||||
bundleID string,
|
||||
metadata map[string]string,
|
||||
) {
|
||||
attr := []health.Attr{sourceAttr}
|
||||
var attr []health.Attr
|
||||
for k, v := range metadata {
|
||||
attr = append(attr, health.StrAttr(fmt.Sprintf("download-metadata-%s", k), v))
|
||||
}
|
||||
|
@ -24,5 +21,5 @@ func (c *service) ReportBundleAppliedFailure(
|
|||
bundleID string,
|
||||
err error,
|
||||
) {
|
||||
health.ReportError(health.ZeroResourceBundle(bundleID), err, sourceAttr)
|
||||
health.ReportError(health.ZeroResourceBundle(bundleID), err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue