There are two ways to ingest data into Parca.
The recommended way to use for generic profiling is Parca Agent. Parca Agent is an always-on sampling profiler that uses eBPF to capture raw profiling data with very low overhead. It observes user-space, and kernel-space stack traces 100 times per second and builds pprof formatted profiles from the extracted data. For in-depth detail and explanation refer to the the Parca Agent Design documentation.
The collected data can be sent to a Parca server, where it can be queried and analyzed over time.
- Getting started with Parca Scraping on Kubernetes
- Parca On Kubernetes (if you are using OpenShift refer to the separate Parca On OpenShift documentation)
- systemd Unit Profiling with Parca Agent
Another way Parca works, is by collecting profiles in pprof format from HTTP endpoints. So all applications have to do is use one of the client libraries for pprof and expose an HTTP endpoint serving it. Pprof client libraries exist for various languages:
perf profile can be converted to pprof using
perf_data_converter, so even programs that do not have native support for pprof can benefit from continuous profiling with Parca. We do, however, recommend to use native instrumentation when possible, as it allows language and runtime specific nuances to be encoded in the respective libraries.
Once there is an HTTP endpoint that serves profiles in pprof format, all that needs to be done is to configure Parca to collect the profile in a regular interval. Configuration can be set in
fgprof profile collection, for example, the scrape configuration in the
parca.yaml file could be set in the following manner:
- job_name: "default"
- targets: [ '127.0.0.1:7070' ]