Parca Continuous Profiling
repository·main·Indexed 26 days ago
https://github.com/parca-dev/parcaA continuous profiling platform that uses eBPF to collect low-overhead CPU and memory usage data across infrastructures. Parca allows developers to analyze performance down to the line number and compare profiles across dimensions like versions or regions. It supports C, C++, Rust, and Go, producing and ingesting pprof formatted profiles. The ecosystem includes a Go-based backend, a React-based UI, and various shared libraries such as @parca/client, @parca/components, and @parca/parser.
What's inside Parca
- Parca Store is the state management library used for the Parca UI. It is responsible for managing the application state within the UI ecosystem.
Overview of the Parca API Client
mainThe Parca API Client (@parca/client) is the official client library used to interact with the Parca API. It provides a structured way to perform operations against the Parca backend, facilitating data retrieval and management for developers building tools or integrations on top of Parca.Overview of Parca Profile Libraries
mainThe@parca/profilepackage provides specialized libraries for handling and working with Parca profiles. It is part of the broader Parca ecosystem designed for continuous profiling data.Overview of Parca Continuous Profiling
mainParca is a continuous profiling tool designed to analyze CPU and memory usage over time, down to the specific line number. It uses an eBPF-based profiler to automatically discover targets from Kubernetes or systemd across infrastructure with very low overhead.
Key features include:
- eBPF Profiler: Supports C, C++, Rust, Go, and more without requiring manual instrumentation.
- Open Standards: Produces and ingests
pprofformatted profiles for wide language interoperability. - Optimized Storage & Querying: Efficiently stores profiling data and allows for label-based searching, aggregation, and comparison across dimensions like deploys, versions, or regions.
Use @parca/dynamicsize to resize components
mainThe@parca/dynamicsizelibrary provides utilities for managing the dynamic resizing of Parca components. It is designed to help components adapt their size based on their container or available space.Use the Parca JS Parser for continuous profiling language
mainThe@parca/parserpackage provides a JavaScript parser designed specifically for the continuous profiling language used by Parca. It allows developers to parse and interpret profiling data formats within JavaScript environments.Use Parca Icons
mainThe@parca/iconspackage provides a collection of commonly used icons used throughout the Parca project. These can be imported and used in your own components or applications to maintain visual consistency with the Parca UI.Use the Parca Component Library
mainThe@parca/componentspackage contains the collection of React components used throughout the Parca UI. Developers can use this library to ensure visual consistency when building tools or interfaces that integrate with Parca.Understand Parca service packages
mainParca provides an API for the continuous profiling Parca server. The functionality is divided into several specialized service packages:
debuginfo: Manages the storage of debug information.profilestore: Handles writingpprofprofiles to the service.query: Enables querying profiles from the service.scrape: Provides information about scrape targets.telemetry: Receives telemetry data from the Agent (e.g., unhandled panics).
Use Parca Hooks in React applications
mainParca Hooks is a library of React hooks specifically designed for use within the Parca UI ecosystem. It provides specialized hooks to manage state and logic common to Parca's user interface components.Set up Parca development environment
mainSet up Parca UI development environment
mainTo develop the Parca UI locally, follow these steps:
- Configure the API endpoint: Create a
.env.localfile inpackages/app/web/and set theVITE_API_ENDPOINTvariable. - Start the Parca backend: Run the backend with CORS enabled to allow the UI to communicate with it.
- Compile shared packages: Run the watch command to transpile TypeScript code and compile Tailwind CSS for the
@parcashared packages. - Start the React dev server: Launch the development server for the
@parca/webpackage.
The UI will be available at
http://localhost:3000.- Configure the API endpoint: Create a