Skip to content

Enabling Pyroscope

Introduction

Pyroscope is a continuous profiling tool designed to collect, store, and analyze application performance data over time. It helps developers optimize resource usage by identifying CPU, memory, and execution bottlenecks. It captures performance data over time, making it easier to identify long-term trends. It uses a time-series database to store profiling data efficiently.

Note

By default, local storage (i.e. Kubernetes node storage) is used for data storage. To switch to cloud storage, refer to Configure S3 for Pyroscope.

Configure S3 for Pyroscope

Ensure that the following prerequisites are met.

  1. You will need a S3 bucket to save the Profiling data.
  2. Your node IAM role should have permission to access the S3 bucket.

Process

To enable Pyroscope in the Privacera monitoring stack, follow the steps below.

  1. SSH into the instance where Privacera Manager is installed.
  2. Navigate to the config directory using the following command:
    Bash
    cd ~/privacera/privacera-manager/config/
    
  3. Copy vars.monioring.yml file from sample-vars folder to custom-vars folder.

    If this file already exists in custom-vars folder then you can skip this step.

    Bash
    cp sample-vars/vars.monitoring.yml custom-vars/
    
  4. Open vars.monioring.yml.

    Bash
    vi custom-vars/vars.monitoring.yml
    

  5. Uncomment the below variables in the file and save it.

    • Provide the S3 buckte name.
      Bash
      MONITORING_S3_BUCKET_NAME: "<YOUR_S3_BUCKET_NAME>"
      
    • Enable Pyroscope.
      Bash
      PYROSCOPE_DEPLOYMENT_ENABLED: "true"
      
  6. Once done, redeploy the monitoring components.

    a. Go to privacera-manager directory.

    Bash
    cd ~/privacera/privacera-manager.
    
    b. Run setup to generate the required files.
    Bash
    ./privacera-manager.sh setup
    
    c. Install the monitoring components.
    Bash
    ./pm_with_helm.sh install-monitoring
    
    d. Once done, run post-install.
    Bash
    ./privacera-manager.sh post-install
    

Comments