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

pyroscope: Add relabel component for modifying and filtering profiles #2574

Merged
merged 6 commits into from
Feb 5, 2025

Conversation

marcsanmi
Copy link
Contributor

PR Description

This PR introduces a new pyroscope.relabel component that allows users to modify or filter profiles using Prometheus relabeling rules. This component is particularly useful for:

  • Standardizing labels across different profile sources

  • Filtering out unwanted profiles based on their labels

  • Adding or removing labels before forwarding profiles

Which issue(s) this PR fixes

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@marcsanmi marcsanmi requested a review from simonswine January 30, 2025 08:49
Copy link
Contributor

github-actions bot commented Jan 30, 2025

💻 Deploy preview deleted.

@marcsanmi marcsanmi requested a review from simonswine January 31, 2025 12:23
@marcsanmi marcsanmi force-pushed the marcsanmi/pyroscope-relabel-component branch from aea9afe to 6d37eb8 Compare January 31, 2025 23:12
@marcsanmi marcsanmi marked this pull request as ready for review February 3, 2025 09:13
@marcsanmi marcsanmi requested review from a team and clayton-cornell as code owners February 3, 2025 09:13
Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for working on this. A few suggestions in the inline view, but overall pretty much ready for 🚀

internal/component/pyroscope/relabel/relabel_test.go Outdated Show resolved Hide resolved
internal/component/pyroscope/relabel/relabel.go Outdated Show resolved Hide resolved
internal/component/pyroscope/relabel/relabel.go Outdated Show resolved Hide resolved
internal/component/pyroscope/relabel/relabel.go Outdated Show resolved Hide resolved
@marcsanmi marcsanmi requested a review from simonswine February 4, 2025 17:02
Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for your work on this 🙂

## Usage

```alloy
pyroscope.relabel "process" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this label be "process" or more generic "<LABEL>"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's better. Updated in cf27661.

@simonswine simonswine added the area/pyroscope Issues/PRs primarly affecting `pyroscope.` components label Feb 5, 2025
@marcsanmi marcsanmi merged commit d4307f2 into main Feb 5, 2025
33 checks passed
@marcsanmi marcsanmi deleted the marcsanmi/pyroscope-relabel-component branch February 5, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/pyroscope Issues/PRs primarly affecting `pyroscope.` components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants