Skip to content

jitria/TraceHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TraceHub

License Go Version BPF Istio WASM

TraceHub is a cloud-native distributed tracing system that combines eBPF/TC-based traffic capture with Istio/Envoy WASM plugins to provide comprehensive observability for Kubernetes service mesh environments.

Features

  • eBPF/TC Traffic Capture: Kernel-level packet capture with minimal overhead
  • Envoy WASM Plugin Integration: Application-layer trace collection via Istio service mesh
  • OpenTelemetry Compatible: Export traces in OTLP format
  • Kubernetes Native: DaemonSet deployment with automatic pod/service discovery

Deployment

Prerequisites

  • Kubernetes cluster (v1.28+)
  • Istio service mesh (v1.20+)
  • Linux kernel 5.15+ with eBPF support
  • Nodes with NET_ADMIN, SYS_ADMIN capabilities

Kubernetes Deployment

kubectl apply -f deployments/tracehub.yaml

Build from Source

# Using Makefile (recommended)
make build          # Binary output: bin/tracehub

# Or manually
cd tracehub && go build -o tracehub .

Docker Build

# Using Makefile
make docker         # Image: boanlab/tracehub:v0.1

# Or manually
docker build -t boanlab/tracehub:v0.1 -f deployments/Dockerfile .

Development

Prerequisites

  • Go 1.23+
  • Clang 14+ / LLVM 14+
  • Linux headers (linux-headers-$(uname -r))
  • bpftool, iproute2

Project Structure

tracehub/
├── go.mod
├── main.go             # Entry point
├── core/               # Core TraceHub lifecycle
├── config/             # Configuration management
├── collector/          # Data collection
│   ├── tc/             # eBPF/TC packet capture
│   └── wasm/           # Envoy WASM plugin
├── aggregator/         # Trace aggregation
├── exporter/           # OTLP export
├── k8s/                # Kubernetes integration
├── container/          # Container runtime integration
├── types/              # Shared type definitions
└── protobuf/           # gRPC proto definitions

Configuration

TraceHub is configured via environment variables or command-line flags:

Variable Default Description
collectorAddr 0.0.0.0 Collector gRPC bind address
collectorPort 4317 Collector gRPC port (OTLP)
wasmPort 4318 WASM plugin API port
exporterAddr 0.0.0.0 Exporter gRPC bind address
exporterPort 8080 Exporter gRPC port
aggregationPeriod 1 Metrics aggregation period (seconds)
cleanUpPeriod 5 Outdated metrics cleanup period (seconds)

Sample Application

A sample application is provided in sample-app/ for testing:

kubectl apply -f sample-app/namespace.yaml
kubectl apply -f sample-app/httpbin.yaml
kubectl apply -f sample-app/telemetry.yaml

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


Copyright 2024 BoanLab @ DKU

About

Enhancing API Observability in Microservices Through Envoy and eBPF-based Traffic Control

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors