diff options
author | Rasmus Dahlberg <rgdd@glasklarteknik.se> | 2025-05-11 20:07:41 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rgdd@glasklarteknik.se> | 2025-05-11 20:23:33 +0200 |
commit | f073493c3d11a4d743f0ee1c3f4b423c51f60e29 (patch) | |
tree | 3aafdeb2d3ddd1ec898468897a6e759bf2a7e709 /pkg/storage/loglist/loglist.go | |
parent | 5285be7f31ea8c043566e4e9f1ed5acd50168837 (diff) |
metrics: Add human-meaningful log_name labelmain
Use log metadata description if available, otherwise fall back on log
URL without the https:// suffix.
Keeping log_id for now at least - seems useful for scripts.
Diffstat (limited to 'pkg/storage/loglist/loglist.go')
-rw-r--r-- | pkg/storage/loglist/loglist.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/storage/loglist/loglist.go b/pkg/storage/loglist/loglist.go index a37cb32..f282113 100644 --- a/pkg/storage/loglist/loglist.go +++ b/pkg/storage/loglist/loglist.go @@ -72,6 +72,10 @@ func New(cfg Config) (LogList, error) { return ll, nil } +func (ll *LogList) LogName(logID [32]byte) (string, error) { + return metadataLogName(ll.md, logID) +} + func (ll *LogList) IsRecent() bool { return time.Now().Before(ll.md.CreatedAt.Add(ll.cfg.MetadataIsRecent)) } |