Skip to content

Metrics remain after Stream deletion #275

@bookcherry

Description

@bookcherry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions