-
Notifications
You must be signed in to change notification settings - Fork 630
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
examples: Add pyroscope relabel componet in rideshare-alloy example #3894
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,40 @@ pyroscope.receive_http "default" { | |
listen_address = "0.0.0.0" | ||
listen_port = 9999 | ||
} | ||
forward_to = [pyroscope.relabel.filter_profiles.receiver] | ||
} | ||
|
||
pyroscope.relabel "filter_profiles" { | ||
// Convert region to datacenter | ||
rule { | ||
action = "replace" | ||
source_labels = ["region"] | ||
target_label = "datacenter" | ||
} | ||
|
||
// Add environment label | ||
rule { | ||
action = "replace" | ||
target_label = "environment" | ||
replacement = "demo" | ||
} | ||
|
||
// Add component label based on application name | ||
rule { | ||
action = "replace" | ||
source_labels = ["__name__"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for history: now I udnerstand why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should somehow translate |
||
target_label = "component" | ||
regex = "ride-sharing-app.*" | ||
replacement = "backend" | ||
} | ||
rule { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should add example of how to drop targets, for example drop 10% of service-a and 20% of service-b |
||
action = "replace" | ||
source_labels = ["__name__"] | ||
target_label = "component" | ||
regex = "load-generator.*" | ||
replacement = "load-generator" | ||
} | ||
|
||
forward_to = [pyroscope.write.backend.receiver] | ||
} | ||
|
||
|
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.
We should be careful with use of dev images in examples, esp.
latest
. Users may not notice that and replicate it in production.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.
This was done as a temporary workaround since there's no other image available than the dev one, but I can pin it to a specific dev tag.
The idea is to change it back to the previous state when the next release is available.