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

[fix][monitor] topic with double quote breaks the prometheus format #20230

Merged
merged 1 commit into from May 10, 2023

Conversation

nicoloboschi
Copy link
Contributor

Motivation

If you create a topic with the double quote in the name (e.g. public/default/"mytopic) then there are some metrics that are generated in a broken format.

pulsar_subscriptions_count{cluster="mycluster",namespace="namespace1",topic="persistent://public/default/"mytopic"} 0.0

This leads to errors in the grafana dashboards.

Modifications

  • Escape all label values when generating the metrics

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Copy link
Member

@michaeljmarshall michaeljmarshall left a comment

Choose a reason for hiding this comment

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

LGTM.

@nicoloboschi
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@mattisonchao
Copy link
Member

mattisonchao commented May 8, 2023

Weird topic name, it should be illegal after applying PIP #19239.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

LGTM

@michaeljmarshall
Copy link
Member

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented May 10, 2023

Codecov Report

Merging #20230 (3aed212) into master (0dd238a) will increase coverage by 3.91%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #20230      +/-   ##
============================================
+ Coverage     34.48%   38.40%   +3.91%     
- Complexity    12537    13149     +612     
============================================
  Files          1614     1691      +77     
  Lines        126170   131348    +5178     
  Branches      13771    14519     +748     
============================================
+ Hits          43509    50440    +6931     
+ Misses        77053    74488    -2565     
- Partials       5608     6420     +812     
Flag Coverage Δ
inttests 24.87% <0.00%> (+0.73%) ⬆️
systests 25.38% <0.00%> (?)
unittests 34.13% <66.66%> (+1.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...mon/policies/data/stats/SubscriptionStatsImpl.java 69.56% <50.00%> (-0.35%) ⬇️
...oker/stats/prometheus/PrometheusMetricStreams.java 95.45% <75.00%> (-4.55%) ⬇️

... and 407 files with indirect coverage changes

@nicoloboschi nicoloboschi merged commit ea56197 into apache:master May 10, 2023
87 of 91 checks passed
@nicoloboschi nicoloboschi deleted the escape-metricds branch May 11, 2023 06:47
nicoloboschi added a commit that referenced this pull request May 11, 2023
nicoloboschi added a commit that referenced this pull request May 11, 2023
nicoloboschi added a commit that referenced this pull request May 11, 2023
nicoloboschi added a commit that referenced this pull request May 11, 2023
@nicoloboschi nicoloboschi added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label May 11, 2023
@michaeljmarshall
Copy link
Member

As discussed on the mailing list https://lists.apache.org/thread/w4jzk27qhtosgsz7l9bmhf1t7o9mxjhp, there is no plan to release 2.9.6, so I am going to remove the release/2.9.6 label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants