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 IncludeTags to R2 Rollup Options #4270

Closed
wants to merge 6 commits into from

Conversation

kentzeng12
Copy link
Collaborator

@kentzeng12 kentzeng12 commented May 28, 2024

What this PR does / why we need it:

To add new reserved metric tags, we need to add the reserved tag to the initial metric id, and the rollup id otherwise the reserved tag will be lost during the R2 rollup process. Currently to do this, we would need to manually update the R2 rules to filter for the new reserved tag. However, this is a time consuming process because we need to update all R2 rules in the repo to ensure the reserved tag is added to all rollup ids.

To address this issue, in the matcher config, I added functionality to specify a list of "include tags" which are tags that if seen in the metric id, we should add to the rollup id. So if the metric id contains a reserved tag that needs to be added to the rollup id, the forward matching logic will add the reserved tag to the rollup id.

In the future, if there are more reserved tags that R2 forward match should add to rollup ids, we should add those tags in the include tags config.

@CLAassistant
Copy link

CLAassistant commented May 28, 2024

CLA assistant check
All committers have signed the CLA.

@kentzeng12 kentzeng12 changed the title [WIP] Add optional tag slice to matching config [WIP] Add optional tag slice to Matcher config Jun 3, 2024
@abliqo
Copy link
Collaborator

abliqo commented Jun 6, 2024

Please provide more clear description of the problem.

@kentzeng12
Copy link
Collaborator Author

Please provide more clear description of the problem.

Please provide more clear description of the problem.

@kentzeng12 kentzeng12 closed this Jun 6, 2024
@kentzeng12 kentzeng12 reopened this Jun 6, 2024
@kentzeng12
Copy link
Collaborator Author

Please provide more clear description of the problem

Updated the problem description. Let me know if I should expand on anything.

src/metrics/filters/tags_filter.go Outdated Show resolved Hide resolved
src/metrics/rules/active_ruleset.go Outdated Show resolved Hide resolved
@kentzeng12 kentzeng12 force-pushed the zengk/forward_match branch 2 times, most recently from b01ea35 to 0fd2011 Compare June 11, 2024 18:14
@kentzeng12 kentzeng12 requested a review from abliqo June 11, 2024 18:16
Copy link
Contributor

@fengcheng1518 fengcheng1518 left a comment

Choose a reason for hiding this comment

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

Please give the pull request a better name :)

@kentzeng12 kentzeng12 changed the title [WIP] Add optional tag slice to Matcher config Add optional tag slice to Matcher config Jun 26, 2024
@kentzeng12 kentzeng12 changed the title Add optional tag slice to Matcher config Add IncludeTags to R2 Rollup Options Jun 26, 2024
@kentzeng12 kentzeng12 marked this pull request as ready for review June 26, 2024 20:45
@shaan420 shaan420 self-requested a review June 27, 2024 11:54
src/metrics/matcher/config.go Outdated Show resolved Hide resolved
src/metrics/filters/tags_filter.go Outdated Show resolved Hide resolved
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.

None yet

5 participants