-
Notifications
You must be signed in to change notification settings - Fork 145
Add annotation control to the profiling feature #1632
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
Conversation
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.
LGTM!
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.
LGTM! Great work! Just a few nits that I have found in the comments really.
Thanks for your work on this. You were asking for small services to integration test java, I think the adservice from the otel demo might be a good candidate: https://opentelemetry.io/docs/demo/services/ad/
If you have any questions please reach out on slack, I also would like to give this a spin if I find a moment, but that shouldn't block you.
regex = "false" | ||
action = "drop" | ||
} | ||
{{- end }} |
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.
I think this would be super helpful to aid debugging once we have profiles ingested. Futhermore it also helps to make sure that if we double collect, we don't have a series conflict.
If you agree with this let's also add it to _java.tpl
and _pprof.tpl
rule {
replacement = "alloy/pyroscope.ebpf"
target_label = "profile_source"
}
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Also remove badges from feature charts, as it's not helpful information Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
…to grafana to get it picked up by pyroscope Signed-off-by: Pete Wall <pete.wall@grafana.com>
Signed-off-by: Pete Wall <pete.wall@grafana.com>
Co-authored-by: Christian Simon <simon@swine.de>
Co-authored-by: Christian Simon <simon@swine.de>
Co-authored-by: Christian Simon <simon@swine.de>
Co-authored-by: Christian Simon <simon@swine.de>
2f0bf14
to
af57a96
Compare
Signed-off-by: Pete Wall <pete.wall@grafana.com>
| java.enabled | bool | `true` | Gather profiles by scraping java HTTP endpoints | | ||
| java.annotationSelectors | object | `{}` | Select pods to profile based on pod annotations. Example: `color: "green"` will select pods with the annotation `color="green"`. Example with multiple values: `color: ["blue", "green"]` will select pods with the annotation `color="blue"` or `color="green"`. | | ||
| java.annotations.enable | string | `"enabled"` | The annotation action for enabling or disabling of Java profile collection. | | ||
| java.enabled | bool | `true` | Gather profiles by scraping Java HTTP endpoints | |
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.
@simonswine is it HTTP scrapping for the Java async profiler?
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.
No that's wrong, I created this: #1683
Now, the following annotations can be used and are on by default:
profiles.grafana.com/cpu.ebpf.enabled
: This Pod should have CPU profiles collected using eBPF.profiles.grafana.com/java.enabled
: This Pod should have Java profiles collected.For each enabled type (
memory
,block
,goroutine
,mutex
,cpu
,fgprof
,godeltaprof_memory
,godeltaprof_mutex
,godeltaprof_block
), you can use the following annotations to control profiling:profiles.grafana.com/<type>.scrape
: This Pod should have pprof profiles collected for the specified type.profiles.grafana.com/<type>.port
: Profiles for the specified type should be collected from this port number.profiles.grafana.com/<type>.port_name
: Profiles for the specified type should be collected from this named port.profiles.grafana.com/<type>.path
: Profiles for the specified type should be collected from this path.profiles.grafana.com/<type>.scheme
: The scheme to use when scraping profiles for the specified type. Defaults tohttp
.Also create the start of a "Targeting Data Collection" document that shows the various features that can be controlled and configured with annotations.
Finally, some clean up for other readme and tests.