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

add support for label_join and label_replace function #129

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Nov 2, 2024

Fixes #29, this PR adds fuzz support for label_join and label_replace.

The destination label is hardcoded to be __promqlsmith_dst_label__ and it is expected for users to not use this label in their series.

The source labels used for join and replace are picked in random. Label join shouldn't have more than 2 labels for joining for simplicity.

label_join(<randomly generated vector selector>, "__promqlsmith_dst_label__", ",", "<source_label1>", "<source_label2>")

Label replace is only copying same label to target label for simplicity.

label_replace(<randomly generated vector selector>, "__promqlsmith_dst_label__", "$1", "<source_label>", "(.*)")

@yeya24 yeya24 merged commit 39de2f9 into main Nov 2, 2024
3 checks passed
@yeya24 yeya24 deleted the support-label-join-label-replace branch November 2, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support label_replace and label_join functions
2 participants