github.com/grafana/pyroscope@v1.18.0/examples/grafana-alloy-auto-instrumentation/ebpf-otel/README.md (about)

     1  # OpenTelemetry eBPF profiler examples
     2  
     3  **⚠️ Important: Linux-only Support**
     4  This example can only be run on Linux systems (amd64/arm64) as it relies on eBPF technology which is specific to the Linux kernel. The profiler requires privileged access to system resources.
     5  For more details refer to the OpenTelemetry ebpf profiler [docs](https://github.com/open-telemetry/opentelemetry-ebpf-profiler).
     6  
     7  These examples demonstrate:
     8  1. OpenTelemetry eBPF profiler collecting system-wide profiles
     9  2. OpenTelemetry Collector receiving and processing the data from the profiler
    10  3. Pyroscope receiving and visualizing the profiles via Grafana
    11  
    12  ## Docker example
    13  
    14  **Note for ARM64 users**: If running on ARM64 Linux, update the Dockerfile:
    15  ```dockerfile
    16  # Line 3: Change amd64 to arm64
    17  RUN wget https://go.dev/dl/go1.22.10.linux-arm64.tar.gz
    18  RUN tar -C /usr/local -xzf go1.22.10.linux-arm64.tar.gz
    19  ```
    20  
    21  1. Start the environment:
    22  
    23  ```bash
    24  # Start all services
    25  docker compose up --build
    26  
    27  # To clean up
    28  docker compose down
    29  ```
    30  2. Access the UI:
    31  ```bash
    32  # Access Grafana
    33  http://localhost:3000
    34  ```
    35  
    36  ## Kubernetes example
    37  
    38  1. Build and prepare the profiler image:
    39  
    40  ```bash
    41  # Build the image with the binary
    42  docker build -t test-ebpf-profiler:latest .
    43  
    44  # Make the image available if necessary. e.g in Minikube
    45  minikube image load test-ebpf-profiler:latest
    46  ```
    47  2. Deploy to Kubernetes:
    48  ```bash
    49  # Apply the manifests
    50  kubectl apply -f .
    51  
    52  # Clean up
    53  kubectl delete -f .
    54  ```
    55  3. Access the UI:
    56  ```bash
    57  # Port forward Grafana
    58  kubectl port-forward svc/grafana-service 3000:3000
    59  
    60  # Access Grafana
    61  http://localhost:3000
    62  ```
    63  
    64  ## Example output:
    65  ![Image](https://github.com/user-attachments/assets/15ff58d4-218a-43dd-9835-df12e13ced3f)