https://github.com/sematext/uprobe-http-tracer
uprobe-based HTTP tracer for Go binaries
https://github.com/sematext/uprobe-http-tracer
bcc ebpf golang instrumentation tracing uprobes
Last synced: 4 months ago
JSON representation
uprobe-based HTTP tracer for Go binaries
- Host: GitHub
- URL: https://github.com/sematext/uprobe-http-tracer
- Owner: sematext
- Created: 2019-10-07T15:04:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-23T14:53:01.000Z (over 6 years ago)
- Last Synced: 2025-04-28T17:45:33.569Z (about 1 year ago)
- Topics: bcc, ebpf, golang, instrumentation, tracing, uprobes
- Language: Go
- Homepage: https://sematext.com/blog/ebpf-userland-apps/
- Size: 1.27 MB
- Stars: 60
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# uprobe-http-tracer
Captures all the calls to `http.Get` function and grabs the full URL from the stack area. For more details head to the [blog post](https://sematext.com/blog/ebpf-userland-apps/).
## Requirements
To build this tool you have to satisify the following requirements:
- have a Linux kernel that supports uprobes
- linux headers
- clang
- LLVM
- libbcc
- Go >1.12
## Usage
1. Build the tool
```
go build -o uprobe-http-tracer main.go
```
2. Write a simple program
```
vi /tmp/main.go
package main
import "net/http"
func main() {
urls := []string{"http://google.com", "http://reddit.com", "http://pastebin.com/tools"}
for _, url := range urls {
http.Get(url)
}
}
go build /tmp/main.go
```
3. See it in action
```
sudo ./uprobe-http-tracer --bin=/tmp/main
PID URL
8274 http://google.com
8276 http://reddit.com
8286 http://pastebin.com/tools
```