Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Metrics] Add support for splitting topic and partition label in Prometheus #12225

Merged

Conversation

codelipenghui
Copy link
Contributor

Fix: #11432

Currently, we are only exposing the partition name for the topic label in Prometheus metrics, which is difficult to
have an aggregated metrics for a partitioned topic.

Before this change, we can only get (topic=xxx-partition-0) in the metrics. After this change, we can get 2 labels (topic=xxx, partition=0).
By default, the broker exposes the single tag for the topic. It need to change splitTopicAndPartitionLabelInPrometheus=true in the broker.conf

New tests added.

…etheus

Fix: apache#11432

Currently, we are only expose the partition name for the topic label in Prometheus metrics, which is difficult to
have an aggregated metrics for a partitioned topic.

Before this change, we can only get (topic=xxx-partition-0) in the metrics. After this change, we can get 2 labels (topic=xxx, partition=0).
By default, the broker expose the single tag for topic. It need to change `splitTopicAndPartitionLabelInPrometheus=true` in the broker.conf

New tests added.
@codelipenghui codelipenghui self-assigned this Sep 28, 2021
@codelipenghui codelipenghui added this to the 2.9.0 milestone Sep 28, 2021
@codelipenghui codelipenghui added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages release/2.8.2 labels Sep 28, 2021
Copy link
Contributor

@Technoboy- Technoboy- left a comment

Choose a reason for hiding this comment

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

LGTM

@merlimat merlimat merged commit 039079e into apache:master Sep 30, 2021
@codelipenghui codelipenghui deleted the penghui/split-topic-partition-label branch September 30, 2021 03:56
codelipenghui added a commit that referenced this pull request Oct 6, 2021
…etheus (#12225)

* [Metrics] Add support for splitting topic and partition label in Prometheus

Fix: #11432

Currently, we are only expose the partition name for the topic label in Prometheus metrics, which is difficult to
have an aggregated metrics for a partitioned topic.

Before this change, we can only get (topic=xxx-partition-0) in the metrics. After this change, we can get 2 labels (topic=xxx, partition=0).
By default, the broker expose the single tag for topic. It need to change `splitTopicAndPartitionLabelInPrometheus=true` in the broker.conf

New tests added.

* Fix checkstyle.

(cherry picked from commit 039079e)
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Oct 6, 2021
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jan 25, 2022
…etheus (apache#12225)

* [Metrics] Add support for splitting topic and partition label in Prometheus

Fix: apache#11432

Currently, we are only expose the partition name for the topic label in Prometheus metrics, which is difficult to
have an aggregated metrics for a partitioned topic.

Before this change, we can only get (topic=xxx-partition-0) in the metrics. After this change, we can get 2 labels (topic=xxx, partition=0).
By default, the broker expose the single tag for topic. It need to change `splitTopicAndPartitionLabelInPrometheus=true` in the broker.conf

New tests added.

* Fix checkstyle.

(cherry picked from commit 039079e)
(cherry picked from commit 5fad80c)
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
…etheus (apache#12225)

* [Metrics] Add support for splitting topic and partition label in Prometheus

Fix: apache#11432

Currently, we are only expose the partition name for the topic label in Prometheus metrics, which is difficult to
have an aggregated metrics for a partitioned topic.

Before this change, we can only get (topic=xxx-partition-0) in the metrics. After this change, we can get 2 labels (topic=xxx, partition=0).
By default, the broker expose the single tag for topic. It need to change `splitTopicAndPartitionLabelInPrometheus=true` in the broker.conf

New tests added.

* Fix checkstyle.
@codelipenghui codelipenghui restored the penghui/split-topic-partition-label branch May 17, 2022 01:21
@codelipenghui codelipenghui deleted the penghui/split-topic-partition-label branch May 17, 2022 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.8 Archived: 2.8 is end of life release/2.8.2 release/2.9.0 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Topic-Level Metrics That Are Partition-Inclusive
5 participants