Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[branch-2.10] Use a more efficient implementation of sanitizeMetricName #1654

Conversation

BewareMyPower
Copy link
Collaborator

Fixes #1652

Motivation

Pulsar 2.10 or earlier depends on io.prometheus:simpleclient:0.5.0, whose implementation of Collectors.sanitizeMetricName uses regex, which is inefficient and costs much CPU.

Modifications

Migrate the implementation of sanitizeMetricName from io:prometheus:simpleclient:0.16.0 to branch-2.10 or earlier.

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

Fixes streamnative#1652

### Motivation

Pulsar 2.10 or earlier depends on io.prometheus:simpleclient:0.5.0,
whose implementation of `Collectors.sanitizeMetricName` uses regex,
which is inefficient and costs much CPU.

### Modifications

Migrate the implementation of `sanitizeMetricName` from
io:prometheus:simpleclient:0.16.0 to branch-2.10 or earlier.
@BewareMyPower BewareMyPower added type/enhancement Indicates an improvement to an existing feature release/2.9.3 release/2.10.2 labels Dec 29, 2022
@BewareMyPower BewareMyPower self-assigned this Dec 29, 2022
@Demogorgon314 Demogorgon314 merged commit 5302f3f into streamnative:branch-2.10.2 Dec 30, 2022
Demogorgon314 pushed a commit to Demogorgon314/kop that referenced this pull request Jan 4, 2023
…me (streamnative#1654)

Fixes streamnative#1652

### Motivation

Pulsar 2.10 or earlier depends on io.prometheus:simpleclient:0.5.0,
whose implementation of `Collectors.sanitizeMetricName` uses regex,
which is inefficient and costs much CPU.

### Modifications

Migrate the implementation of `sanitizeMetricName` from
io:prometheus:simpleclient:0.16.0 to branch-2.10 or earlier.
@BewareMyPower BewareMyPower deleted the bewaremypower/2.10-sanitize-metric branch January 4, 2023 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants