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

when metrics is disabled, metrics still try to gather #470

Closed
3 tasks done
Tracked by #465
jon-nfc opened this issue Jan 14, 2025 · 0 comments · Fixed by #469
Closed
3 tasks done
Tracked by #465

when metrics is disabled, metrics still try to gather #470

jon-nfc opened this issue Jan 14, 2025 · 0 comments · Fixed by #469
Assignees
Labels
bug::failure to confirm Bug caused by failure to confirm item worked type::bug Issue Type v1.8-beta
Milestone

Comments

@jon-nfc
Copy link
Member

jon-nfc commented Jan 14, 2025

within settings METRICS_ENABLED attribute exists. its purpose is to disable metrics.

Details

When metrics is enabled, collection of metrics is possible. prior to it being possible, the host must be setup. this is done by ensuring that the metrics directory exists so that ALL processors can save their metrics for the metrics endpoint.

However, if metrics are disabled via METRICS_ENABLED=False, the installed metrics app still tries to gather. This causes a crash as the metrics directory does not exist.

Confirmed by deploying 39a1183 which has the bug. the gunicorn service keeps crashing. simply running mkdir -p /tmp/prometheus and restarting gunicorn and the issue disappears.

Tasks

  • when METRICS_ENABLED=False, dont add the middleware
  • when METRICS_ENABLED=False, dont add the installed app
  • Test
@jon-nfc jon-nfc added type::bug Issue Type bug::failure to confirm Bug caused by failure to confirm item worked v1.8-beta labels Jan 14, 2025
@jon-nfc jon-nfc added this to the Next Release milestone Jan 14, 2025
@jon-nfc jon-nfc self-assigned this Jan 14, 2025
@jon-nfc jon-nfc moved this to In progress in Centurion ERP Jan 14, 2025
@jon-nfc jon-nfc moved this from In progress to Planning in Centurion ERP Jan 14, 2025
@jon-nfc jon-nfc moved this from Planning to In progress in Centurion ERP Jan 14, 2025
jon-nfc added a commit that referenced this issue Jan 14, 2025
metrics not enabled, dont add the settings for the app as collection still occurs

ref: #469 #470
jon-nfc added a commit that referenced this issue Jan 14, 2025
…xist

if it don't exist python cant set it.

ref: #469 #470
jon-nfc added a commit that referenced this issue Jan 14, 2025
@jon-nfc jon-nfc moved this from In progress to Done in Centurion ERP Jan 14, 2025
jon-nfc added a commit that referenced this issue Jan 14, 2025
jon-nfc added a commit that referenced this issue Jan 14, 2025
@jon-nfc jon-nfc linked a pull request Jan 14, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug::failure to confirm Bug caused by failure to confirm item worked type::bug Issue Type v1.8-beta
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant