Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

ISSUE-20772: [improve][broker] Add metrics related interfaces for BrokerInterceptor #5833

Description

@streamnativebot

url: apache#20772

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

When I want to monitor the relevant data in the BrokerInterceptor, currently the BrokerInterceptor does not provide relevant interfaces.

I think providing such extensions is necessary.

Solution

https://github.com/apache/pulsar/blob/e96b3398912163eb6e0528c10aed3507c95952fd/pulsar-broker/src/main/java/org/apache/pulsar/broker/intercept/BrokerInterceptor.java

Add a interface, like this:

default void addCustomizeMetrics(PrometheusMetricStreams streams, PulsarService pulsar){
}

https://github.com/apache/pulsar/blob/e96b3398912163eb6e0528c10aed3507c95952fd/pulsar-broker/src/main/java/org/apache/pulsar/broker/stats/prometheus/PrometheusMetricsGenerator.java#L185-L187

Then callback the addCustomizeMetrics(stream, pulsar) method here.

This is just a draft.

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions