Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output_status_retry_wait means the elapsed time from the first retry #217

Open
daipom opened this issue Jul 9, 2023 · 2 comments
Open
Labels

Comments

@daipom
Copy link

daipom commented Jul 9, 2023

The document says output_status_retry_wait means current retry_wait computed from last retry time and next retry time.

- `fluentd_output_status_retry_wait`
- current retry_wait computed from last retry time and next retry time

However, it actually means the elapsed time from the first retry.
We need to fix the value or the document.

if info['retry']
next_time = info['retry']['next_time']
start_time = info['retry']['start']
if start_time.nil? && info['instance_variables']
# v0.12 does not include start, use last_retry_time instead
start_time = info['instance_variables'][:last_retry_time]
end
wait = 0
if next_time && start_time
wait = next_time - start_time
end
@metrics[:retry_wait].set(wait.to_f, labels: label)
end

It is calculated as next_time - start.
start is the time of the first retry, so this value means the elapsed time from the first retry.

@raulgupto
Copy link

thanks for your effort @daipom. This fix/clarification is important imo as many dashboard metrics depend on prometheus and can cause noise if someone interprets this in a wrong way.

1 similar comment
@raulgupto
Copy link

thanks for your effort @daipom. This fix/clarification is important imo as many dashboard metrics depend on prometheus and can cause noise if someone interprets this in a wrong way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants