You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe it would be beneficial to have a no-op implementation of PrometheusExporter::Client for use in test environments. This would allow us to avoid sending metrics during tests while maintaining the same interface.
I believe we could implement a stub client like the following:
classStubClient < Clientdefsend(json);end# Additional stub methods can be added here if necessaryend
If this idea is deemed appropriate, I'd be happy to create a pull request with the implementation.
The text was updated successfully, but these errors were encountered:
seems to work fine -- in our case, in dev/test environments prometheus_exporter is loaded and PrometheusExprorter::Client.default is set to PrometheusExporter::ClientStub.new. We also don't see any significant test suite slow down. In fact, it's OK for us to have this stub in our codebase (not in the gem itself). Should I open PR with these changes? If not, feel free to close this issue. I hope if someone tries to solve the same problem this snippet will be helpful.
Hey!
I believe it would be beneficial to have a no-op implementation of PrometheusExporter::Client for use in test environments. This would allow us to avoid sending metrics during tests while maintaining the same interface.
I believe we could implement a stub client like the following:
If this idea is deemed appropriate, I'd be happy to create a pull request with the implementation.
The text was updated successfully, but these errors were encountered: