apache / apache/pulsar

[Monitoring] Is it possible to add producer/consumer name labels to pulsar metrics?

Open
#12,254 1 comment 0 reactions 0 assignees View on GitHub
lifecycle/stale type/enhancement
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

**Is your enhancement request related to a problem? Please describe.**
As a developer, when I use pulsar monitoring I want to build alerts based on them in Grafana. But unfortunately most of the times topics that my applications use are used by others as well. So I cant tell unambiguously how many producers or subscribers are coming from my applications using just `pulsar_consumers_count`, `pulsar_producers_count` metric.

**Describe the solution you'd like**
I would like to have a label based on producer and consumer name with which I can build my metric expression in order to filter only the relevant information for me.

**Describe alternatives you've considered**
Currently, I don't think there is an alternative, but I am open for suggestions.

**Additional context**
If someone can guide me to the component responsible for this I can open a pull request with the change that is needed(if is needed)

Contributor guide

Open the contributing guide

Research direction

Start by locating the monitoring code that emits the `pulsar_consumers_count` and `pulsar_producers_count` metrics. Determine whether producer and consumer names are available at that point and how adding labels affects metric cardinality. Done means the metrics can be filtered by the requested names without ambiguity, with appropriate validation of the resulting metric output.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.