Skip to content

Init thanos_status metrics on startup#8758

Open
prymitive wants to merge 1 commit intothanos-io:mainfrom
prymitive:thanos_status_init
Open

Init thanos_status metrics on startup#8758
prymitive wants to merge 1 commit intothanos-io:mainfrom
prymitive:thanos_status_init

Conversation

@prymitive
Copy link
Copy Markdown
Contributor

thanos_status metrics are not being reported until the metric is set to 1 when the server starts. This is fine for services that start quickly, but for Thanos Receive we replay the WAL on startup during which server isn't ready but we don't have the thanos_status metric until it's ready. Fix it by setting the metric to 0 when it's created, so it's exported instantly.

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

thanos_status metrics are not being reported until the metric is set to 1 when the server starts.
This is fine for services that start quickly, but for Thanos Receive we replay the WAL on startup during which server isn't ready but we don't have the thanos_status metric until it's ready.
Fix it by setting the metric to 0 when it's created, so it's exported instantly.

Signed-off-by: Lukasz Mierzwa <lukasz@cloudflare.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants