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

Optimize zlabel usage for stringlabels #8077

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fpetkovski
Copy link
Contributor

Using the ZLabelsToPromLabels hack is no longer free with stringlabels because the in-memory format of the two types is different. Because of this, using a stringlabels build in the Receiver can be more CPU intensive than the normal build.

In order to allow for an efficient usage of stringlabels, this commit removes ZLabelsToPromLabels calls in TSDBStore and ProxyStore. There is now a specialized implementation of ZLabel conversion functions with a stringlabels build tag in order to avoid panics, but long term we should get rid of these functions if possible.

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

Using the ZLabelsToPromLabels hack is no longer free with stringlabels
because the in-memory format of the two types is different. Because of this,
using a stringlabels build in the Receiver can be more CPU intensive than
the normal build.

In order to allow for an efficient usage of stringlabels, this commit removes
`ZLabelsToPromLabels` calls in TSDBStore and ProxyStore. There is now a specialized
implementation of ZLabel conversion functions with a stringlabels build tag in order to
avoid panics, but long term we should get rid of these functions if possible.

Signed-off-by: Filip Petkovski <[email protected]>
@fpetkovski fpetkovski force-pushed the zlabels-stringlabels branch from 8d0f284 to f69bf44 Compare January 29, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant