From f073493c3d11a4d743f0ee1c3f4b423c51f60e29 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sun, 11 May 2025 20:07:41 +0200 Subject: metrics: Add human-meaningful log_name label 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. --- pkg/storage/loglist/loglist.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/storage/loglist/loglist.go') 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)) } -- cgit v1.2.3