redpanda-data / redpanda-data/benthos
Metrics remain after Stream deletion
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 571
- Forks
- 120
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 18
Description
We are building an application using Redpanda connect.
When running in streams mode, if we delete the file corresponding to a specific stream, that stream is removed, but the associated metrics remain.
As we repeatedly create and delete streams with different names, the unused metrics accumulate, causing the heap to grow. This results in monotonically increasing memory usage.
Is it possible to have the corresponding metrics removed automatically when a stream is deleted?
## log of removing stream
{"@service":"benthos","level":"info","msg":"Stream trigger-g config deleted, attempting to remove stream."}
{"@service":"benthos","level":"info","msg":"Removed stream trigger-g."}
## trigger-g metrics remain after stream deletion
processor_latency_ns{label="",path="root.pipeline.processors.2.catch.1",stream="trigger-g",quantile="0.5"} NaN
processor_latency_ns{label="",path="root.pipeline.processors.2.catch.1",stream="trigger-g",quantile="0.9"} NaN
processor_latency_ns{label="",path="root.pipeline.processors.2.catch.1",stream="trigger-g",quantile="0.99"} NaN
processor_latency_ns_sum{label="",path="root.pipeline.processors.2.catch.1",stream="trigger-g"} 0
processor_latency_ns_count{label="",path="root.pipeline.processors.2.catch.1",stream="trigger-g"} 0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named in the report. Start by reproducing the issue in streams mode, delete a stream configuration, and trace the removal path alongside the metrics registry. Done means metrics for the deleted stream disappear and repeatedly creating and deleting streams no longer causes unused metrics or monotonic heap growth.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100