Returns the expires_at timestamp of the FASTLY_API_TOKEN.
This addresses part of #146.
If the the metric is not in the blocklist, it will create a a TokenRecorder that has two methods: Gatherer() and Set()
Gatherer() returns the registry with the new gauge metric that is appended to the default gatherers
Set() fetches token data from api.fastly.com/tokens/self and sets the expiration timestamp (if it exists)
The metric is labeled with the token_id and the user_id to help in finding the token in the Fastly UI.
Sample:
# HELP fastly_rt_token_expiration Unix timestamp of the expiration time of the Fastly API Token
# TYPE fastly_rt_token_expiration gauge
fastly_rt_token_expiration{token_id="token_id_1234",user_id="user_id_5678"} 1.721232155e+09
New gauge metric: fastly_rt_token_expiration
Returns the expires_at timestamp of the
FASTLY_API_TOKEN
.This addresses part of #146.
If the the metric is not in the blocklist, it will create a a
TokenRecorder
that has two methods:Gatherer()
andSet()
api.fastly.com/tokens/self
and sets the expiration timestamp (if it exists)token_id
and theuser_id
to help in finding the token in the Fastly UI.Sample: