Skip to content

Conversation

Ruto8
Copy link

@Ruto8 Ruto8 commented Sep 1, 2025

The main module includes some consts and defaults, which both client and server require to work. In the README, it is suggested to treat client and server modules as entry-points, but without requiring the main module they won't work.

In this commit, I'm adding a require and tests to show the problem.

The error we experience with simply requiring a client is the following

/usr/local/bundle/gems/prometheus_exporter-2.2.0/lib/prometheus_exporter/client.rb:56:in `initialize': uninitialized constant PrometheusExporter::DEFAULT_PORT (NameError)

I considered removing the require from the test helper, but I figured these new tests make more sense and will be more stable (just so there's some independence and reliable require order)

The main module includes some consts and defaults, which both client and server require to work.
In the README, it is suggested to treat client and server modules as entry-points,
but without requiring the main module they won't work.

In this commit, I'm adding a require and tests to show the problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant