From 90aa2a8ffdff28aa6916b992275ae7b69f84bf47 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 6 Oct 2020 11:20:36 +0300 Subject: [PATCH] lib/promscrape/discovery/openstack: show expiration time for refreshed OpenStack token in seconds - this is easier to interpret by human --- lib/promscrape/discovery/openstack/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/promscrape/discovery/openstack/api.go b/lib/promscrape/discovery/openstack/api.go index 5f456687a..21e0e0745 100644 --- a/lib/promscrape/discovery/openstack/api.go +++ b/lib/promscrape/discovery/openstack/api.go @@ -54,7 +54,7 @@ func (cfg *apiConfig) getFreshAPICredentials() (*apiCredentials, error) { return nil, fmt.Errorf("cannot refresh OpenStack api token: %w", err) } cfg.creds = newCreds - logger.Infof("successfully refreshed OpenStack api token; next expiration: %s", newCreds.expiration) + logger.Infof("successfully refreshed OpenStack api token; expiration: %.3f seconds", time.Until(newCreds.expiration).Seconds()) return newCreds, nil }