Skip to content

Commit 6a7a8c1

Browse files
committed
contextvars bpftrace examples
1 parent 62da90e commit 6a7a8c1

7 files changed

Lines changed: 56 additions & 0 deletions

File tree

uprobe-contextvars/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

uprobe-contextvars/README.md

Whitespace-only changes.

uprobe-contextvars/contextvars.bt

Whitespace-only changes.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Docker compose file for bpftrace and some python webapps
2+
3+
services:
4+
bpftrace:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile.bpftrace
8+
privileged: true
9+
pid: "host"
10+
network_mode: "host"
11+
volumes:
12+
- ./bpftrace:/app/bpftrace
13+
working_dir: /app/bpftrace
14+
entrypoint: ["/bin/bash", "-c", "tail -f /dev/null"] # Keep container running
15+
16+
flask_app:
17+
build:
18+
context: .
19+
dockerfile: Dockerfile.flask
20+
network_mode: "host"
21+
environment:
22+
- FLASK_APP=app.py
23+
- FLASK_RUN_HOST=0.0.0.0
24+
- FLASK_RUN_PORT=5000
25+
volumes:
26+
- ./flask_app:/app/flask_app
27+
working_dir: /app/flask_app
28+
command: ["flask", "run"]
29+
30+
django_app:
31+
build:
32+
context: .
33+
dockerfile: Dockerfile.django
34+
network_mode: "host"
35+
environment:
36+
- PYTHONUNBUFFERED=1
37+
volumes:
38+
- ./django_app:/app/django_app
39+
working_dir: /app/django_app
40+
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]

uprobe-contextvars/main.py

Whitespace-only changes.

uprobe-contextvars/pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[project]
2+
name = "uprobe-contextvars"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = []

uprobe-contextvars/uv.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)