Describe the bugloki_querier_tail_active and loki_querier_tail_active_streams are positive or zero soon after boot but become negative some time after.
To Reproduce
Steps to reproduce the behavior:
Started Loki v3.2.1
Started many loki-canary
Query: loki_querier_tail_active or loki_querier_tail_active_streams
Expected behavior
These metrics shows the number of tail connections and streams, which are always positive or zero.
Describe the bug
loki_querier_tail_active
andloki_querier_tail_active_streams
are positive or zero soon after boot but become negative some time after.To Reproduce Steps to reproduce the behavior:
loki_querier_tail_active
orloki_querier_tail_active_streams
Expected behavior These metrics shows the number of tail connections and streams, which are always positive or zero.
Environment:
Screenshots, Promtail config, or terminal output
--
These metrics are incremented at https://github.com/grafana/loki/blob/v3.2.1/pkg/querier/tail.go#L344 and https://github.com/grafana/loki/blob/v3.2.1/pkg/querier/tail.go#L303 , and decremented at https://github.com/grafana/loki/blob/v3.2.1/pkg/querier/tail.go#L272-L273 and no other code modify them. Is
Tailer.close()
called multiple times?