From 4f526ab7bb61e6549d6ae3e6e34b84ba35c6d6f2 Mon Sep 17 00:00:00 2001 From: Christian Simon Date: Tue, 27 May 2025 09:07:39 +0100 Subject: [PATCH 1/2] docs: Add instructions about profiling on macOS (#4202) Unfortunately SIP gets in the way of profiling system binaries using pyspy. https://github.com/benfred/py-spy/issues/397#issuecomment-2627389627 --- .../configure-client/language-sdks/python.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/sources/configure-client/language-sdks/python.md b/docs/sources/configure-client/language-sdks/python.md index 3088354907..214aa57447 100644 --- a/docs/sources/configure-client/language-sdks/python.md +++ b/docs/sources/configure-client/language-sdks/python.md @@ -23,6 +23,25 @@ To capture and analyze profiling data, you need either a hosted Pyroscope OSS se The Pyroscope server can be a local server for development or a remote server for production use. +### Profiling on macOS + +macOS has a feature called System Integrity Protection (SIP) that prevents even the root user from reading memory from any binary located in system folders. + +The easiest way to avoid interference from SIP, is by installing a Python distribution into your home folder. This can be achieved for example by using `pyenv`: + +```bash +# Setup pyenv +brew update +brew install pyenv +echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc +echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc +echo 'eval "$(pyenv init - zsh)"' >> ~/.zshrc +# Restart your shell +exec "$SHELL" +# Install Python 3.12 +pyenv install 3.12 +``` + ## Add Python profiling to your application Install the `pyroscope-io` pip package: From d22c97a3b5e70057755a444fc9f2bb586e6fed9f Mon Sep 17 00:00:00 2001 From: Christian Simon Date: Tue, 3 Jun 2025 13:32:46 +0100 Subject: [PATCH 2/2] Pin minio/mc cli --- .../pyroscope/helm/pyroscope/ci/micro-services-values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operations/pyroscope/helm/pyroscope/ci/micro-services-values.yaml b/operations/pyroscope/helm/pyroscope/ci/micro-services-values.yaml index 9bc6978bc3..a4c387035d 100644 --- a/operations/pyroscope/helm/pyroscope/ci/micro-services-values.yaml +++ b/operations/pyroscope/helm/pyroscope/ci/micro-services-values.yaml @@ -64,7 +64,7 @@ pyroscope: cpu: 20m initContainers: - name: create-bucket - image: minio/mc + image: minio/mc:RELEASE.2025-04-08T15-39-49Z command: - /bin/sh - -c