Skip to content

Bump prometheus client version from 0.5.0 to 0.15.0 - #13785

Merged
hezhangjian merged 3 commits into
apache:masterfrom
hezhangjian:bump-prometheus-cli-version
Jul 13, 2022
Merged

hezhangjian merged 3 commits into
apache:masterfrom
hezhangjian:bump-prometheus-cli-version

Conversation

@hezhangjian

@hezhangjian hezhangjian commented Jan 17, 2022 •

Copy link
Copy Markdown
Member

Motivation

  • prometheus simpleclient has broken api, it makes pulsar-client-origin can not well used with other libraries
  • specify OpenMetrics

This PR contains metric name broken changes.

Modifications

Bump prometheus client version from 0.5.0 to 0.15.0

changes

  • bump the client version
  • rename the field prometheus client UNTYPED to UNKNOWN
  • OpenMetrics's counter name needs a _total suffix

metrics name broken changes

  • rename pulsar_expired_token_count to pulsar_expired_token_total
  • rename pulsar_authentication_success_count to pulsar_authentication_success_total
  • rename pulsar_authentication_failures_count to pulsar_authentication_failures_total
  • rename pulsar_sink_sink_exceptions_total_1min to pulsar_sink_sink_exceptions_1min_total
  • rename pulsar_source_received_total_1min to pulsar_source_received_1min_total
  • rename pulsar_source_written_total_1min to pulsar_source_written_1min_total
  • rename pulsar_source_source_total_1min to pulsar_source_source_exceptions_1min_total
  • rename pulsar_source_system_exceptions_total_1min to pulsar_source_system_exceptions_1min_total
  • rename pulsar_function_received_total_1min to pulsar_function_received_1min_total
  • rename pulsar_function_user_exceptions_total_1min to pulsar_function_user_exceptions_1min_total
  • rename pulsar_function_system_exceptions_total_1min to pulsar_function_system_exceptions_1min_total
  • rename pulsar_function_processed_successfully_total_1min to pulsar_function_processed_successfully_1min_total
  • rename pulsar_function_received_total_1min to pulsar_function_received_1min_total
  • rename pulsar_function_user_exceptions_total_1min to pulsar_function_user_exceptions_1min_total
  • rename pulsar_function_system_exceptions_total_1min to pulsar_function_system_exceptions_1min_total
  • rename pulsar_function_processed_successfully_total_1min to pulsar_function_processed_successfully_1min_total
  • rename pulsar_sink_received_total_1min to pulsar_sink_received_1min_total
  • rename pulsar_sink_written_total_1min to pulsar_sink_written_1min_total
  • rename pulsar_sink_sink_exceptions_total_1min to pulsar_sink_sink_exceptions_1min_total
  • rename pulsar_sink_system_exceptions_total_1min to pulsar_sink_system_exceptions_1min_total
  • rename pulsar_sink_received_total_1min to pulsar_sink_received_1min_total
  • rename pulsar_sink_written_total_1min to pulsar_sink_written_1min_total
  • rename pulsar_sink_sink_exceptions_total_1min to pulsar_sink_sink_exceptions_1min_total
  • rename pulsar_sink_system_exceptions_total_1min to pulsar_sink_system_exceptions_1min_total

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc
    As mentioned above, the metrics name has changed

nicoloboschi
nicoloboschi previously approved these changes Jan 17, 2022
@hezhangjian hezhangjian added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Jan 17, 2022
@apache apache deleted a comment from github-actions Bot Jan 17, 2022
mattisonchao
mattisonchao previously approved these changes Jan 17, 2022

@mattisonchao mattisonchao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM +1

@hezhangjian
hezhangjian force-pushed the bump-prometheus-cli-version branch from b190f84 to f2d9af8 Compare January 18, 2022 00:57
Jason918
Jason918 previously approved these changes Jan 18, 2022
@codelipenghui codelipenghui added this to the 2.10.0 milestone Jan 18, 2022
codelipenghui
codelipenghui previously approved these changes Jan 18, 2022
@hezhangjian
hezhangjian force-pushed the bump-prometheus-cli-version branch from 4bea6a1 to 84181c9 Compare January 20, 2022 08:41
@hezhangjian hezhangjian changed the title Bump prometheus client version from 0.5.0 to 0.14.1 [WIP] Bump prometheus client version from 0.5.0 to 0.14.1 Jan 20, 2022
@hezhangjian

hezhangjian commented Jan 20, 2022 •

Copy link
Copy Markdown
Member Author

prometheus/client_java#615
introduced a breaking change, need discuss

@codelipenghui codelipenghui modified the milestones: 2.10.0, 2.11.0 Jan 21, 2022
@hezhangjian
hezhangjian force-pushed the bump-prometheus-cli-version branch 2 times, most recently from a2a6238 to 7e5b04f Compare May 13, 2022 12:31
@hezhangjian
hezhangjian force-pushed the bump-prometheus-cli-version branch 3 times, most recently from 9b5ff9b to 2b50604 Compare May 22, 2022 04:41
@hezhangjian
hezhangjian force-pushed the bump-prometheus-cli-version branch 2 times, most recently from 460171e to 466a663 Compare May 25, 2022 12:05
@hezhangjian

Copy link
Copy Markdown
Member Author

/pulsarbot run-failure-checks

@hezhangjian
hezhangjian merged commit c0b4d57 into apache:master Jul 13, 2022
@hezhangjian
hezhangjian deleted the bump-prometheus-cli-version branch July 13, 2022 15:45
@dave2wave

Copy link
Copy Markdown
Member

gaozhangmin pushed a commit to gaozhangmin/pulsar that referenced this pull request Jul 14, 2022
### Motivation
- prometheus `simpleclient` has broken api, it makes `pulsar-client-origin` can not well used with other libraries
- specify `OpenMetrics`

This PR contains metric name broken changes.

### Modifications
Bump prometheus client version from 0.5.0 to 0.15.0

### changes
- bump the client version
- rename the field prometheus client `UNTYPED` to `UNKNOWN`
- `OpenMetrics`'s counter name needs a `_total` suffix

### metrics name broken changes
- rename `pulsar_expired_token_count` to `pulsar_expired_token_total`
- rename `pulsar_authentication_success_count` to `pulsar_authentication_success_total`
- rename `pulsar_authentication_failures_count` to `pulsar_authentication_failures_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_source_received_total_1min` to `pulsar_source_received_1min_total`
- rename `pulsar_source_written_total_1min` to `pulsar_source_written_1min_total`
- rename `pulsar_source_source_total_1min` to `pulsar_source_source_exceptions_1min_total `
- rename `pulsar_source_system_exceptions_total_1min` to `pulsar_source_system_exceptions_1min_total `
- rename `pulsar_function_received_total_1min` to `pulsar_function_received_1min_total `
- rename `pulsar_function_user_exceptions_total_1min` to `pulsar_function_user_exceptions_1min_total`
- rename `pulsar_function_system_exceptions_total_1min` to `pulsar_function_system_exceptions_1min_total`
- rename `pulsar_function_processed_successfully_total_1min` to `pulsar_function_processed_successfully_1min_total`
- rename `pulsar_function_received_total_1min` to `pulsar_function_received_1min_total`
- rename `pulsar_function_user_exceptions_total_1min` to `pulsar_function_user_exceptions_1min_total`
- rename `pulsar_function_system_exceptions_total_1min` to `pulsar_function_system_exceptions_1min_total`
- rename `pulsar_function_processed_successfully_total_1min` to `pulsar_function_processed_successfully_1min_total`
- rename `pulsar_sink_received_total_1min` to `pulsar_sink_received_1min_total`
- rename `pulsar_sink_written_total_1min` to `pulsar_sink_written_1min_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_sink_system_exceptions_total_1min` to `pulsar_sink_system_exceptions_1min_total`
- rename `pulsar_sink_received_total_1min` to `pulsar_sink_received_1min_total`
- rename `pulsar_sink_written_total_1min` to `pulsar_sink_written_1min_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_sink_system_exceptions_total_1min` to `pulsar_sink_system_exceptions_1min_total`

### Documentation

Check the box below or label this PR directly.

Need to update docs? 

- [x] `doc-required` 
As mentioned above, the metrics name has changed
@michaeljmarshall

michaeljmarshall commented Jul 14, 2022 •

Copy link
Copy Markdown
Member

@dave2wave - thanks for sharing. Based on two of the enhancements, we should probably upgrade before cutting the 2.11 branch. Here are the two that we should specifically benefit from:

[ENHANCEMENT] Reduce the number of core threads in HTTPServer from 5 to 1. The HTTPServer will still start up to 5 threads on demand if there are parallel requests, but it will use only 1 thread as long as requests are sequential (prometheus/client_java#786).
[ENHANCEMENT] Optimize metric name sanitization: Replace the regular expression with a hard-coded optimized algorithm to improve performance (prometheus/client_java#777). Thanks @fwbrasil

@hezhangjian

Copy link
Copy Markdown
Member Author

@dave2wave @michaeljmarshall Thanks, I will follow up on this

wuxuanqicn pushed a commit to wuxuanqicn/pulsar that referenced this pull request Jul 14, 2022
### Motivation
- prometheus `simpleclient` has broken api, it makes `pulsar-client-origin` can not well used with other libraries
- specify `OpenMetrics`

This PR contains metric name broken changes.

### Modifications
Bump prometheus client version from 0.5.0 to 0.15.0

### changes
- bump the client version
- rename the field prometheus client `UNTYPED` to `UNKNOWN`
- `OpenMetrics`'s counter name needs a `_total` suffix

### metrics name broken changes
- rename `pulsar_expired_token_count` to `pulsar_expired_token_total`
- rename `pulsar_authentication_success_count` to `pulsar_authentication_success_total`
- rename `pulsar_authentication_failures_count` to `pulsar_authentication_failures_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_source_received_total_1min` to `pulsar_source_received_1min_total`
- rename `pulsar_source_written_total_1min` to `pulsar_source_written_1min_total`
- rename `pulsar_source_source_total_1min` to `pulsar_source_source_exceptions_1min_total `
- rename `pulsar_source_system_exceptions_total_1min` to `pulsar_source_system_exceptions_1min_total `
- rename `pulsar_function_received_total_1min` to `pulsar_function_received_1min_total `
- rename `pulsar_function_user_exceptions_total_1min` to `pulsar_function_user_exceptions_1min_total`
- rename `pulsar_function_system_exceptions_total_1min` to `pulsar_function_system_exceptions_1min_total`
- rename `pulsar_function_processed_successfully_total_1min` to `pulsar_function_processed_successfully_1min_total`
- rename `pulsar_function_received_total_1min` to `pulsar_function_received_1min_total`
- rename `pulsar_function_user_exceptions_total_1min` to `pulsar_function_user_exceptions_1min_total`
- rename `pulsar_function_system_exceptions_total_1min` to `pulsar_function_system_exceptions_1min_total`
- rename `pulsar_function_processed_successfully_total_1min` to `pulsar_function_processed_successfully_1min_total`
- rename `pulsar_sink_received_total_1min` to `pulsar_sink_received_1min_total`
- rename `pulsar_sink_written_total_1min` to `pulsar_sink_written_1min_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_sink_system_exceptions_total_1min` to `pulsar_sink_system_exceptions_1min_total`
- rename `pulsar_sink_received_total_1min` to `pulsar_sink_received_1min_total`
- rename `pulsar_sink_written_total_1min` to `pulsar_sink_written_1min_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_sink_system_exceptions_total_1min` to `pulsar_sink_system_exceptions_1min_total`

### Documentation

Check the box below or label this PR directly.

Need to update docs? 

- [x] `doc-required` 
As mentioned above, the metrics name has changed
hezhangjian added a commit to apache/bookkeeper that referenced this pull request Jul 16, 2022
### Motivation
See https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md
A COUNTER needs `metrics_name_total` or `metrics_name_created`

This PR contains metric name broken changes.

### Modifications
Rename counter's `_count` to `_total`

### metrics name broken changes
- rename `FAILED_TO_RESOLVE_NETWORK_LOCATION_COUNTER` to `FAILED_TO_RESOLVE_NETWORK_LOCATION_TOTAL`
- rename `ENSEMBLE_NOT_ADHERING_TO_PLACEMENT_POLICY_COUNT` to `ENSEMBLE_NOT_ADHERING_TO_PLACEMENT_POLICY_TOTAL`
- rename `ACTIVE_ENTRY_LOG_COUNT` to `ACTIVE_ENTRY_LOG_TOTAL`
- rename `MAJOR_COMPACTION_COUNT` to `MAJOR_COMPACTION_TOTAL`
- rename `MINOR_COMPACTION_COUNT` to `MINOR_COMPACTION_TOTAL`
- rename `ACTIVE_LEDGER_COUNT` to `ACTIVE_LEDGER_TOTAL`
- rename `DELETED_LEDGER_COUNT` to `DELETED_LEDGER_TOTAL`
- rename `JOURNAL_FORCE_WRITE_GROUPING_COUNT` to `JOURNAL_FORCE_WRITE_GROUPING_TOTAL`

### Also see
- apache/pulsar#13785
- apache/pulsar#16591
- apache/pulsar#16610
- apache/pulsar#16611
@momo-jun

Copy link
Copy Markdown
Contributor

The doc update has been included in the PR. The doc-required label needs a refresh.
//cc @Anonymitaet

@github-actions github-actions Bot added doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc-required Your PR changes impact docs and you will update later. labels Jul 21, 2022
Jason918 pushed a commit that referenced this pull request Sep 2, 2022
### Motivation
- prometheus `simpleclient` has broken api, it makes `pulsar-client-origin` can not well used with other libraries
- specify `OpenMetrics`

This PR contains metric name broken changes.

### Modifications
Bump prometheus client version from 0.5.0 to 0.15.0

### changes
- bump the client version
- rename the field prometheus client `UNTYPED` to `UNKNOWN`
- `OpenMetrics`'s counter name needs a `_total` suffix

### metrics name broken changes
- rename `pulsar_expired_token_count` to `pulsar_expired_token_total`
- rename `pulsar_authentication_success_count` to `pulsar_authentication_success_total`
- rename `pulsar_authentication_failures_count` to `pulsar_authentication_failures_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_source_received_total_1min` to `pulsar_source_received_1min_total`
- rename `pulsar_source_written_total_1min` to `pulsar_source_written_1min_total`
- rename `pulsar_source_source_total_1min` to `pulsar_source_source_exceptions_1min_total `
- rename `pulsar_source_system_exceptions_total_1min` to `pulsar_source_system_exceptions_1min_total `
- rename `pulsar_function_received_total_1min` to `pulsar_function_received_1min_total `
- rename `pulsar_function_user_exceptions_total_1min` to `pulsar_function_user_exceptions_1min_total`
- rename `pulsar_function_system_exceptions_total_1min` to `pulsar_function_system_exceptions_1min_total`
- rename `pulsar_function_processed_successfully_total_1min` to `pulsar_function_processed_successfully_1min_total`
- rename `pulsar_function_received_total_1min` to `pulsar_function_received_1min_total`
- rename `pulsar_function_user_exceptions_total_1min` to `pulsar_function_user_exceptions_1min_total`
- rename `pulsar_function_system_exceptions_total_1min` to `pulsar_function_system_exceptions_1min_total`
- rename `pulsar_function_processed_successfully_total_1min` to `pulsar_function_processed_successfully_1min_total`
- rename `pulsar_sink_received_total_1min` to `pulsar_sink_received_1min_total`
- rename `pulsar_sink_written_total_1min` to `pulsar_sink_written_1min_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_sink_system_exceptions_total_1min` to `pulsar_sink_system_exceptions_1min_total`
- rename `pulsar_sink_received_total_1min` to `pulsar_sink_received_1min_total`
- rename `pulsar_sink_written_total_1min` to `pulsar_sink_written_1min_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_sink_system_exceptions_total_1min` to `pulsar_sink_system_exceptions_1min_total`

### Documentation

Check the box below or label this PR directly.

Need to update docs?

- [x] `doc-required`
As mentioned above, the metrics name has changed

(cherry picked from commit c0b4d57)
@eolivelli

Copy link
Copy Markdown
Contributor

This change cannot go to branch-2.10
it is a important behaviour change

@Jason918 please revert

Jason918 added a commit that referenced this pull request Sep 2, 2022
@Jason918

Jason918 commented Sep 2, 2022

Copy link
Copy Markdown
Contributor

This change cannot go to branch-2.10
it is a important behaviour change

@eolivelli
Sure, thanks for the reminding. Sorry I didn't notice the release/important-notice.
I add this because #16591 depends on this.
I have reverted both.

Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
### Motivation
See https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md
A COUNTER needs `metrics_name_total` or `metrics_name_created`

This PR contains metric name broken changes.

### Modifications
Rename counter's `_count` to `_total`

### metrics name broken changes
- rename `FAILED_TO_RESOLVE_NETWORK_LOCATION_COUNTER` to `FAILED_TO_RESOLVE_NETWORK_LOCATION_TOTAL`
- rename `ENSEMBLE_NOT_ADHERING_TO_PLACEMENT_POLICY_COUNT` to `ENSEMBLE_NOT_ADHERING_TO_PLACEMENT_POLICY_TOTAL`
- rename `ACTIVE_ENTRY_LOG_COUNT` to `ACTIVE_ENTRY_LOG_TOTAL`
- rename `MAJOR_COMPACTION_COUNT` to `MAJOR_COMPACTION_TOTAL`
- rename `MINOR_COMPACTION_COUNT` to `MINOR_COMPACTION_TOTAL`
- rename `ACTIVE_LEDGER_COUNT` to `ACTIVE_LEDGER_TOTAL`
- rename `DELETED_LEDGER_COUNT` to `DELETED_LEDGER_TOTAL`
- rename `JOURNAL_FORCE_WRITE_GROUPING_COUNT` to `JOURNAL_FORCE_WRITE_GROUPING_TOTAL`

### Also see
- apache/pulsar#13785
- apache/pulsar#16591
- apache/pulsar#16610
- apache/pulsar#16611
nodece pushed a commit to nodece/pulsar that referenced this pull request Jun 5, 2025
### Motivation
- prometheus `simpleclient` has broken api, it makes `pulsar-client-origin` can not well used with other libraries
- specify `OpenMetrics`

This PR contains metric name broken changes.

### Modifications
Bump prometheus client version from 0.5.0 to 0.15.0

### changes
- bump the client version
- rename the field prometheus client `UNTYPED` to `UNKNOWN`
- `OpenMetrics`'s counter name needs a `_total` suffix

### metrics name broken changes
- rename `pulsar_expired_token_count` to `pulsar_expired_token_total`
- rename `pulsar_authentication_success_count` to `pulsar_authentication_success_total`
- rename `pulsar_authentication_failures_count` to `pulsar_authentication_failures_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_source_received_total_1min` to `pulsar_source_received_1min_total`
- rename `pulsar_source_written_total_1min` to `pulsar_source_written_1min_total`
- rename `pulsar_source_source_total_1min` to `pulsar_source_source_exceptions_1min_total `
- rename `pulsar_source_system_exceptions_total_1min` to `pulsar_source_system_exceptions_1min_total `
- rename `pulsar_function_received_total_1min` to `pulsar_function_received_1min_total `
- rename `pulsar_function_user_exceptions_total_1min` to `pulsar_function_user_exceptions_1min_total`
- rename `pulsar_function_system_exceptions_total_1min` to `pulsar_function_system_exceptions_1min_total`
- rename `pulsar_function_processed_successfully_total_1min` to `pulsar_function_processed_successfully_1min_total`
- rename `pulsar_function_received_total_1min` to `pulsar_function_received_1min_total`
- rename `pulsar_function_user_exceptions_total_1min` to `pulsar_function_user_exceptions_1min_total`
- rename `pulsar_function_system_exceptions_total_1min` to `pulsar_function_system_exceptions_1min_total`
- rename `pulsar_function_processed_successfully_total_1min` to `pulsar_function_processed_successfully_1min_total`
- rename `pulsar_sink_received_total_1min` to `pulsar_sink_received_1min_total`
- rename `pulsar_sink_written_total_1min` to `pulsar_sink_written_1min_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_sink_system_exceptions_total_1min` to `pulsar_sink_system_exceptions_1min_total`
- rename `pulsar_sink_received_total_1min` to `pulsar_sink_received_1min_total`
- rename `pulsar_sink_written_total_1min` to `pulsar_sink_written_1min_total`
- rename `pulsar_sink_sink_exceptions_total_1min` to `pulsar_sink_sink_exceptions_1min_total`
- rename `pulsar_sink_system_exceptions_total_1min` to `pulsar_sink_system_exceptions_1min_total`

### Documentation

Check the box below or label this PR directly.

Need to update docs?

- [x] `doc-required`
As mentioned above, the metrics name has changed

(cherry picked from commit c0b4d57)
Signed-off-by: Zixuan Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/metrics doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. release/important-notice The changes which are important should be mentioned in the release note

Projects

None yet

Development

Successfully merging this pull request may close these issues.