Skip to content

Commit 734f4fd

Browse files
committed
address review comments
1 parent 574e9eb commit 734f4fd

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

examples/grafana-agent-auto-instrumentation/ebpf-otel/README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OpenTelemetry eBPF profiler example
1+
# OpenTelemetry eBPF profiler examples
22

33
**⚠️ Important: Linux-only Support**
44
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.
@@ -14,6 +14,8 @@ These examples demonstrate:
1414

1515
Follow the build instructions:
1616

17+
1. Build the profiler binary:
18+
1719
```bash
1820
# Clone the repository
1921
git clone https://github.com/open-telemetry/opentelemetry-ebpf-profiler
@@ -25,13 +27,18 @@ make docker-image
2527
# Build the profiler binary
2628
make agent
2729
```
30+
31+
2. Copy the built binary to the example directory:
32+
```bash
33+
# Copy the ebpf-profiler binary to the example directory
34+
cp ebpf-profiler /path/to/example/directory/
35+
```
2836
**Note:** The following examples will consider that an `ebpf-profiler` binary is already existing on each example root directory.
2937

30-
For more details, please refer to opentelemetry-ebpf-profiler [docs](https://github.com/open-telemetry/opentelemetry-ebpf-profiler?tab=readme-ov-file#building)
38+
For more details, please refer to opentelemetry-ebpf-profiler [repository](https://github.com/open-telemetry/opentelemetry-ebpf-profiler)
3139

3240
## Docker example
33-
34-
After building the profiler binary, start the environment:
41+
1. Start the environment:
3542

3643
```bash
3744
# Start all services
@@ -40,10 +47,15 @@ docker-compose up --build
4047
# To clean up
4148
docker-compose down
4249
```
50+
2. Access the UI:
51+
```bash
52+
# Access Grafana
53+
http://localhost:3000
54+
```
4355

4456
## Kubernetes example
4557

46-
1. After building the profiler binary, build and prepare the profiler image:
58+
1. Build and prepare the profiler image:
4759

4860
```bash
4961
# Build the image with the binary
@@ -64,4 +76,7 @@ kubectl delete -f kubernetes/
6476
```bash
6577
# Port forward Grafana
6678
kubectl port-forward svc/grafana-service 3000:3000
79+
80+
# Access Grafana
81+
http://localhost:3000
6782
```

examples/grafana-agent-auto-instrumentation/ebpf-otel/docker/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
image: otel/opentelemetry-collector-contrib:latest
55
command: ["--config=/etc/otel-collector-config.yaml", "--feature-gates=service.profilesSupport"]
66
volumes:
7-
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
7+
- ./config/otel-collector-config.yaml:/etc/otel-collector-config.yaml
88
ports:
99
- "4317:4317"
1010
- "4318:4318"
@@ -29,6 +29,7 @@ services:
2929

3030
pyroscope:
3131
image: grafana/pyroscope:latest
32+
command: ["-self-profiling.disable-push=true"]
3233
ports:
3334
- "4040:4040"
3435
networks:

examples/grafana-agent-auto-instrumentation/ebpf-otel/kubernetes/otel-collector.yaml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@ spec:
1111
labels:
1212
app: otel-collector
1313
spec:
14-
# initContainers:
15-
# - name: wait-for-pyroscope
16-
# image: busybox
17-
# command: [ 'sh', '-c', '
18-
# timeout=10;
19-
# counter=0;
20-
# while [ $counter -lt $timeout ]; do
21-
# if nc -z pyroscope-service 4040; then
22-
# echo "Pyroscope is up!";
23-
# exit 0;
24-
# fi;
25-
# echo "Waiting for pyroscope... ($counter/$timeout)";
26-
# counter=$((counter+1));
27-
# sleep 1;
28-
# done;
29-
# echo "Timeout waiting for pyroscope";
30-
# exit 1
31-
# ' ]
3214
containers:
3315
- name: otel-collector
3416
image: otel/opentelemetry-collector-contrib:latest

examples/grafana-agent-auto-instrumentation/ebpf-otel/kubernetes/pyroscope.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ spec:
1515
containers:
1616
- name: pyroscope
1717
image: grafana/pyroscope:latest
18+
args:
19+
- "-self-profiling.disable-push=true"
1820
ports:
1921
- containerPort: 4040
2022
---

0 commit comments

Comments
 (0)