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

Require sidekiq/api in GovukPrometheusExporter #299

Merged
merged 2 commits into from
Jun 15, 2023

Conversation

AgaDufrat
Copy link
Contributor

@AgaDufrat AgaDufrat commented Jun 15, 2023

Why

The workers were erroring with:

PrometheusExporter::Instrumentation::SidekiqProcess Prometheus Exporter Failed
To Collect Stats uninitialized constant Sidekiq::Process
PrometheusExporter::Instrumentation::SidekiqQueue Prometheus Exporter Failed To
Collect Stats uninitialized constant Sidekiq::Queue
PrometheusExporter::Instrumentation::SidekiqStats Prometheus Exporter Failed To
Collect Stats uninitialized constant Sidekiq::Stats

and failing to send metrics following a switch from Statsd to Prometheus Exporter: alphagov/govuk_sidekiq@763144d

Sidekiq::Process, Sidekiq::Queue, Sidekiq::Stats are defined in Sidekiq API. It appears that to get access to the functionality, the API needs to be required. See https://github.com/sidekiq/sidekiq/wiki/API

Resolves #298

Testing

Tested in integration. Logs showing no errors

Screenshot 2023-06-15 at 11 19 20

@AgaDufrat AgaDufrat force-pushed the update-prometheus-exporter branch from 95c6609 to 5266ca5 Compare June 15, 2023 11:09
@AgaDufrat AgaDufrat force-pushed the update-prometheus-exporter branch from 5266ca5 to c19c381 Compare June 15, 2023 12:05
The workers were erroring with:
```
PrometheusExporter::Instrumentation::SidekiqProcess Prometheus Exporter Failed
To Collect Stats uninitialized constant Sidekiq::Process
PrometheusExporter::Instrumentation::SidekiqQueue Prometheus Exporter Failed To
Collect Stats uninitialized constant Sidekiq::Queue
PrometheusExporter::Instrumentation::SidekiqStats Prometheus Exporter Failed To
Collect Stats uninitialized constant Sidekiq::Stats
```

and failing to send metrics following a switch from Statsd to Prometheus Exporter:
alphagov/govuk_sidekiq@763144d

Sidekiq::Process, Sidekiq::Queue, Sidekiq::Stats are defined in Sidekiq API. It
appears that to get access to the functionality the API needs to be required
See https://github.com/sidekiq/sidekiq/wiki/API
@AgaDufrat AgaDufrat force-pushed the update-prometheus-exporter branch from c19c381 to e898029 Compare June 15, 2023 12:10
@sengi
Copy link
Contributor

sengi commented Jun 15, 2023

Thanks for fixing this! 🙇✨

CHANGELOG.md Outdated
@@ -1,3 +1,7 @@
# Unreleased
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totes optional: in case you wanna get this out quickly, feel free to do the 8.0.2 release in this PR (entirely up to you though, just mentioning in case it saves you time/hassle of getting another review for essentially the same change)

@AgaDufrat AgaDufrat merged commit e615e9b into main Jun 15, 2023
@AgaDufrat AgaDufrat deleted the update-prometheus-exporter branch June 15, 2023 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sidekiq workers fail to export Prometheus metrics
2 participants