Skip to content

Conversation

Watson1978
Copy link
Contributor

This PR prevent to shut down the driver used in subsequent tests.
When we use timer plugin helper or other components that depend on the event loop, the driver does not operate as expected if it is shut down.

If you add timer plugin helper, you can confirm this behavior.

diff --git a/lib/fluent/plugin/filter_prometheus.rb b/lib/fluent/plugin/filter_prometheus.rb
index ccdfe78..ab3a889 100644
--- a/lib/fluent/plugin/filter_prometheus.rb
+++ b/lib/fluent/plugin/filter_prometheus.rb
@@ -7,6 +7,8 @@ class PrometheusFilter < Fluent::Plugin::Filter
     include Fluent::Plugin::PrometheusLabelParser
     include Fluent::Plugin::Prometheus
 
+    helpers :timer
+
     def initialize
       super
       @registry = ::Prometheus::Client.registry

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Copy link

@daipom daipom left a comment

Choose a reason for hiding this comment

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

Thanks!

@daipom daipom merged commit a6a3b5e into fluent:master Aug 4, 2025
7 checks passed
@Watson1978 Watson1978 deleted the test branch August 4, 2025 01:20
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.

2 participants