Skip to content

Commit f95863f

Browse files
authored
[backport] docs: Add instructions about profiling on macOS (#4202) (#4207)
* docs: Add instructions about profiling on macOS (#4202) Unfortunately SIP gets in the way of profiling system binaries using pyspy. benfred/py-spy#397 (comment) * Pin minio/mc cli
1 parent 87a9807 commit f95863f

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

docs/sources/configure-client/language-sdks/python.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ To capture and analyze profiling data, you need either a hosted Pyroscope OSS se
2323

2424
The Pyroscope server can be a local server for development or a remote server for production use.
2525

26+
### Profiling on macOS
27+
28+
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.
29+
30+
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`:
31+
32+
```bash
33+
# Setup pyenv
34+
brew update
35+
brew install pyenv
36+
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
37+
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
38+
echo 'eval "$(pyenv init - zsh)"' >> ~/.zshrc
39+
# Restart your shell
40+
exec "$SHELL"
41+
# Install Python 3.12
42+
pyenv install 3.12
43+
```
44+
2645
## Add Python profiling to your application
2746

2847
Install the `pyroscope-io` pip package:

operations/pyroscope/helm/pyroscope/ci/micro-services-values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pyroscope:
6464
cpu: 20m
6565
initContainers:
6666
- name: create-bucket
67-
image: minio/mc
67+
image: minio/mc:RELEASE.2025-04-08T15-39-49Z
6868
command:
6969
- /bin/sh
7070
- -c

0 commit comments

Comments
 (0)