eBPF based always-on CPU/GPU profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!
eBPF based always-on CPU/GPU profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!
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 stacktraces 19 times per second and builds pprof formatted profiles from the extracted data. Read more details in the design documentation.
The collected data can be viewed locally via HTTP endpoints and then be configured to be sent to a Parca server to be queried and analyzed over time.
See the Kubernetes Getting Started.
Parca Agent is continuously enhancing its support for multiple languages. Incomplete list of languages we currently support:
Please check our docs for further information.
[!NOTE] Further language support is coming in the upcoming weeks and months.
Types of profiles that are available:
[!NOTE] Please check our docs if your language is supported.
The following types of profiles require explicit instrumentation:
To debug potential errors, enable debug logging using --log-level=debug.
Parca Agent supports specifying configuration through command-line flags or a YAML configuration file via --config-path. The configuration file can contain both relabel configurations and any CLI flag using hyphenated names (e.g., log-level, http-address). Command-line arguments take precedence over configuration file values, making it easy to override specific settings while maintaining a base configuration file.
Flags:
…Parca Agent supports Prometheus relabeling. The following labels are always attached to profiles:
node: The name of the node that the process is running on as specified by the --node flag.comm: The command name of the process being profiled.cpu: The CPU the sample was taken on. Can be disabled with --metadata-disable-cpu-label.thread_id: The thread ID of the thread being profiled. Can be disabled with --metadata-disable-thread-id-label.thread_name: The command name of the thread being profiled. Can be disabled with --metadata-disable-thread-comm-label.And optionally you can attach additional labels using the --metadata-external-labels flag.
Using relabeling the following labels can be attached to profiles:
__meta_process_pid: The process ID of the process being profiled.__meta_process_cmdline: The command line arguments of the process being profiled.__meta_env_var_*: The value of the environment variable * of the process being profiled. Note that the environment variables to pick up must be specified by --include-env-var flag.__meta_process_cgroup: The (main) cgroup of the process being profiled.__meta_process_ppid: The parent process ID of the process being profiled.__meta_process_executable_file_id: The file ID (a hash) of the executable of the process being profiled.__meta_process_executable_name: The basename of the executable of the process being profiled.__meta_process_executable_build_id: The build ID of the executable of the process being profiled.__meta_process_executable_compiler: The compiler used to build the executable of the process being profiled.__meta_process_executable_static: Whether the executable of the process being profiled is statically linked.__meta_process_executable_stripped: Whether the executable of the process being profiled is stripped from debuginfo.__meta_system_kernel_release: The kernel release of the system.__meta_system_kernel_machine: The kernel machine of the system (typically the architecture).__meta_agent_revision: The revision of the agent.__meta_kubernetes_namespace: The namespace of the pod the process is running in.__meta_kubernetes_pod_name: The name of the pod the process is running in.__meta_kubernetes_pod_label_*: The value of the label * of the pod the process is running in.__meta_kubernetes_pod_labelpresent_*: Whether the label * of the pod the process is running in is present.__meta_kubernetes_pod_annotation_*: The value of the annotation * of the pod the process is running in.__meta_kubernetes_pod_annotationpresent_*: Whether the annotation * of the pod the process is running in is present.__meta_kubernetes_pod_ip: The IP of the pod the process is running in.__meta_kubernetes_pod_container_name: The name of the container the process is running in.__meta_kubernetes_pod_container_id: The ID of the container the process is running in.__meta_kubernetes_pod_container_image: The image of the container the process is running in.__meta_kubernetes_pod_container_init: Whether the container the process is running in is an init container.__meta_kubernetes_pod_ready: Whether the pod the process is running in is ready.__meta_kubernetes_pod_phase: The phase of the pod the process is running in.__meta_kubernetes_node_name: The name of the node the process is running on.__meta_kubernetes_pod_host_ip: The host IP of the pod the process is running in.__meta_kubernetes_pod_uid: The UID of the pod the process is running in.__meta_kubernetes_pod_controller_kind: The kind of the controller of the pod the process is running in.__meta_kubernetes_pod_controller_name: The name of the controller of the pod the process is running in.__meta_kubernetes_node_label_*: The value of the label * of the node the process is running on.__meta_kubernetes_node_labelpresent_*: Whether the label * of the node the process is running on is present.__meta_kubernetes_node_annotation_*: The value of the annotation * of the node the process is running on.__meta_kubernetes_node_annotationpresent_*: Whether the annotation * of the node the process is running on is present.__meta_docker_container_id: The ID of the container the process is running in.__meta_docker_container_name: The name of the container the process is running in.__meta_docker_container_label_*: The value of the label * of the container the process is running in.__meta_docker_container_labelpresent_*: Whether the label * of the container the process is running in is present.__meta_docker_build_kit_container_id: The ID of the container the process is running in.__meta_containerd_container_id: The ID of the container the process is running in.__meta_containerd_container_name: The name of the container the process is running in.__meta_containerd_container_label_*: The value of the label * of the container the process is running in.__meta_containerd_container_labelpresent_*: Whether the label * of the container the process is running in is present.__meta_containerd_pod_name: The name of the pod the process is running in.__meta_lxc_container_id: The ID of the container the process is running in.Two worked configurations ship with the agent. They are alternatives rather than layers -- emitting both vocabularies doubles the resource labels on every profile -- so pick the one that matches where profiles are going:
parca-k8s-config.yaml promotes Kubernetes
metadata under parca-agent's own label names (namespace, pod,
container), which is what the Parca UI and stored queries are written
against. It mirrors the default a jsonnet deployment renders into its
ConfigMap.config/examples/otlp-semconv-k8s.yaml
promotes the same metadata under OpenTelemetry semantic convention names,
for use with --otlp-address.The semconv example is worth reading even if you write your own. The __meta_*
labels above are discovery metadata, deleted after relabelling, so what an
operator promotes -- and only that -- is attached to profiles. On the OTLP path
those promoted labels become resource attributes verbatim, which means
relabelling is also how attribute names are chosen, dots included. The
example covers the cases a plain rename does not: the workload kind pivot into
k8s.deployment.name, splitting the container image into name and tag, and
mapping uname machine names onto the host.arch vocabulary. It also sets
service.name from the pod rather than letting it default to the executable
name, which in a cluster means every JVM workload reporting
service.name="java".
Both are examples rather than defaults: which attributes are worth their cardinality is a per-deployment decision.
Parca Agent is required to be running as root user (or CAP_SYS_ADMIN). Various security precautions have been taken to protect users running Parca Agent. See details in Security Considerations.
To report a security vulnerability, see this guide.
Check out our Contributing Guide to get started!
User-space code: Apache 2
Kernel-space code (eBPF profilers): GNU General Public License, version 2
Thanks to:
No open issues yet, or sync has not completed.