-
Notifications
You must be signed in to change notification settings - Fork 171
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
feat(discovery): Add a remote_relabel component #1368
base: main
Are you sure you want to change the base?
feat(discovery): Add a remote_relabel component #1368
Conversation
58bd6d1
to
2d2f80f
Compare
This allows to receive discovery relabeling rules from a remote server using a websocket connection. We plan this for an experimental way to control profile collection with Grafana Cloud Profiles.
2d2f80f
to
5e4ee53
Compare
var _ component.Component = (*Component)(nil) | ||
|
||
func defaultInstance() string { | ||
// TODO: This should come from Alloy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be addressed before merging PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me, nice and simple.
Remember to update changelog, docs and API depdendency once it is tagged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor non-blocking doc suggestions
|
||
| Name | Type | Description | Default | Required | | ||
| --------- | ------------------- | ------------------ | ------- | -------- | | ||
| `targets` | `list(map(string))` | Targets to relabel | | yes | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `targets` | `list(map(string))` | Targets to relabel | | yes | | |
| `targets` | `list(map(string))` | Targets to relabel. | | yes | |
|
||
| Name | Type | Description | Default | Required | | ||
| --------------------- | ---------- | ------------------------------------------------------------------ | --------- | -------- | | ||
| `url` | `string` | Full URL to the websocket server. Needs to start with ws:// wss:// | | yes | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `url` | `string` | Full URL to the websocket server. Needs to start with ws:// wss:// | | yes | | |
| `url` | `string` | Full URL to the websocket server. Must start with `ws://` or `wss://`. | | yes | |
Hey, thanks for opening a PR, that's an interesting idea :) Adding such a component is a big deal, it would have been better to discuss it over a proposal (it's not too late to create one now and use this PR as a POC). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ blocking the PR for now till above's comment is clarified
This allows to receive discovery relabelling rules from a remote server using a websocket connection.
We plan this for an experimental way to control profile collection with Grafana Cloud Profiles very dynamically. Currently the only backend available is the settings server for Pyroscope (grafana/pyroscope#3416)