API service for storing and querying observability context
Status: v0.1.0 (Alpha)
Observe Context is a centralized API service that stores, indexes, and serves observability metrics, logs, and traces.
- ✅ RESTful API for metrics ingestion
- ✅ Query language for complex filtering
- ✅ Time-series data storage
- ✅ Integration with Observe Pulse
- ✅ GraphQL API for flexible queries
- ✅ Rate limiting and authentication
- ✅ Scalable architecture
┌─────────────┐
│ Pulse │
│ (Metrics) │
└──────┬──────┘
│
▼
┌─────────────┐
│ Context │
│ (API) │
└──────┬──────┘
│
▼
┌─────────────┐
│ Database │
│ (TimeSeries)│
└─────────────┘
# Clone the repository
git clone https://github.com/observeco/context.git
cd context
# Start with Docker Compose
docker-compose up -d
# API available at http://localhost:8080
# GraphQL at http://localhost:8080/graphql# Install dependencies
go mod download
# Run the server
go run cmd/server/main.go
# Server starts on http://localhost:8080GET /healthPOST /api/v1/metrics
Content-Type: application/json
{
"name": "cpu_usage",
"value": 45.2,
"timestamp": "2026-05-21T14:30:00Z",
"labels": {
"host": "server-1",
"region": "us-east"
}
}GET /api/v1/metrics?name=cpu_usage&host=server-1&from=1hquery GetMetrics($name: String!, $from: String!) {
metrics(name: $name, from: $from) {
timestamp
value
labels
}
}Create .env file:
# Server
PORT=8080
HOST=0.0.0.0
# Database
DB_HOST=localhost
DB_PORT=5432
DB_NAME=observe_context
DB_USER=postgres
DB_PASSWORD=your_password
# Redis (for caching)
REDIS_HOST=localhost
REDIS_PORT=6379
# Auth
JWT_SECRET=your-secret-key
# Rate Limiting
RATE_LIMIT=1000
RATE_WINDOW=1m# Run tests
go test ./...
# Run with hot reload (using air)
air
# Generate GraphQL schema
go run cmd/generate/main.go
# Build binary
go build -o context-server cmd/server/main.go- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Open a Pull Request
MIT License - see LICENSE for details.
- Documentation: https://docs.observeco.com/context
- API Docs: http://localhost:8080/docs
- Issues: https://github.com/observeco/context/issues
ObservecO - Context for your observability.