Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

parca-agent

> 数据库
Open source

eBPF based always-on CPU/GPU profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!

739 stars0 likes0 views
WebsiteGitHub

About

eBPF based always-on CPU/GPU profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!

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 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.

Requirements

  • Linux Kernel version 5.3+ with BTF

Quickstart

See the Kubernetes Getting Started.

Language Support

Parca Agent is continuously enhancing its support for multiple languages. Incomplete list of languages we currently support:

  • C, C++, Go (with extended support), Rust
  • .NET, Deno, Erlang, Java, Julia, Node.js, Wasmtime, PHP 8 and above
  • Ruby, Python

Please check our docs for further information.

[!NOTE] Further language support is coming in the upcoming weeks and months.

Supported Profiles

Types of profiles that are available:

  • On-CPU
  • Soon: Network usage, Allocations

[!NOTE] Please check our docs if your language is supported.

The following types of profiles require explicit instrumentation:

  • Runtime specific information such as Goroutines

Debugging

Logging

To debug potential errors, enable debug logging using --log-level=debug.

Configuration

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:

…

Metadata Labels

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.

Example configurations

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.

Security

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.

Contributing

Check out our Contributing Guide to get started!

License

User-space code: Apache 2

Kernel-space code (eBPF profilers): GNU General Public License, version 2

Credits

Thanks to:

  • Kinvolk for creating Inspektor Gadget; some parts of this project were inspired by parts of it.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goccontinuous-profilingcppcuda

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库