Skip to content

Commit

Permalink
release 0.6.0 (#105)
Browse files Browse the repository at this point in the history
* docs: adapt changelog

Signed-off-by: Thomas Belian <[email protected]>

* docs: adjust readme

Signed-off-by: Thomas Belian <[email protected]>

* chore: adjust version string

Signed-off-by: Thomas Belian <[email protected]>

---------

Signed-off-by: Thomas Belian <[email protected]>
  • Loading branch information
bt909 authored Oct 10, 2024
1 parent 7f67bcb commit 24acfa8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unreleased / XXXX-XX-XX
# 0.6.0 / 2024-10-10

* [CHANGE] adapt to slog logging which is introduced by exporter-toolkit https://github.com/bt909/imap-mailstat-exporter/pull/101
* [CHANGE] adapt to slog logging (changes log output) which is introduced by exporter-toolkit https://github.com/bt909/imap-mailstat-exporter/pull/101
* [CHANGE] adapt duration log entries to strings for json output like versions worked before switch to slog https://github.com/bt909/imap-mailstat-exporter/pull/104

* [CHORE] update module github.com/prometheus/exporter-toolkit from v0.12.0 to v0.13.0 https://github.com/bt909/imap-mailstat-exporter/pull/101
Expand Down
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,34 @@ As this exporter is using [exporter-toolkit](https://github.com/prometheus/expor

The exporter provides 14 metrics, three main metrics are provided for all accounts, one metric can be enabled using a feature flag `--oldestunseen.feature`, eigth metrics are quota related and only provided if the server supports imap quota and two informatial metrics.

If your account supports quota you can see in loglevel INFO (default) with the following log entry:
If your account supports quota you can see in loglevel INFO (default) with the following log entry since version 0.6.0:

```output
time=2024-10-09T17:19:25.407Z level=INFO source=/go/src/imap-mailstat-exporter/internal/valuecollect/valuecollector.go:287 msg="Fetching quota related metrics" [email protected]
```

JSON Log format is a bit more detailed:

```output
{"time":"2024-10-09T17:30:25.663440549Z","level":"INFO","source":{"function":"github.com/bt909/imap-mailstat-exporter/internal/valuecollect.(*imapStatsCollector).Collect.func1","file":"/workspaces/imap-mailstat-exporter/internal/valuecollect/valuecollector.go","line":287},"msg":"Fetching quota related metrics","address":"[email protected]"}
```

Up to version 0.5.0 the log entries are looking a bit different.

```output
ts=2023-10-30T22:12:27.376Z caller=valuecollector.go:266 level=info msg="Fetching quota related metrics" [email protected]
```

The exposed metrics were the following in version 0.0.1 and can be enabled by using command line flag `--migration.mode`:
Since version 0.6.0 the log format changed a bit, because of an update of the internal log library. Changes are:

* `time=...` instead of `ts=...`
* `level=INFO` instead of `level=info` (or `level=WARN`, etc., loglevel names are uppercase now)
* `source=...` instead of `caller=...`

The exposed metrics were the following in version 0.0.1 and can be enabled by using command line flag `--migration.mode` (only in version 0.1.0):

`imap_mailstat_mails_all_quantity`
`imap_mailstat_mails_unseen_quantity`
Expand All @@ -38,7 +58,7 @@ The exposed metrics were the following in version 0.0.1 and can be enabled by us
> [!IMPORTANT]
> In version 0.1.0 the metric names were changed. First because they were hard to read and now I hope I follow more best practices in naming metrics. As 0.1.0 comes with more than one breaking change my decision was to rename the metrics at this point as well. The exporter allows you for migration in version 0.1.0 to get the old metrics as well using command line flag `--migration.mode` or the also available environment variable `MAILSTAT_EXPORTER_MIGRATIONMODE=true`. This flag, the environment variable and the old metrics are removed in version 0.2.0.
The exposed metrics since version 0.1.0 are the following:
The exposed metrics since version 0.1.0 are:

metric | type | description | remarks
-------|------|-------------|---------
Expand Down
2 changes: 1 addition & 1 deletion cmd/imap-mailstat-exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

var (
name = "imap-mailstat-exporter"
Version = "0.6.0-beta"
Version = "0.6.0"
configfile *string
oldestunseenfeature *bool
mailboxpassword *string
Expand Down

0 comments on commit 24acfa8

Please sign in to comment.