An open API service indexing awesome lists of open source software.

https://github.com/jplane/otel-chat

Out here chatting with your logs, traces, and metrics
https://github.com/jplane/otel-chat

Last synced: 3 months ago
JSON representation

Out here chatting with your logs, traces, and metrics

Awesome Lists containing this project

README

          

# OpenTelemetry Vector Chat System

Captures OpenTelemetry logs, traces, and metrics, generates vector embeddings, stores them in Qdrant, and provides an LLM chat interface for natural language queries.

## What It Does

1. **LogisticsSim** - Generates sample telemetry from a simulated logistics system
2. **VectorExporter** - Exports telemetry to Qdrant as vector embeddings via Azure OpenAI
3. **TelemetryChat** - Chat interface for querying telemetry with natural language

## Dev Container Setup

Open this repo in VS Code and select "Reopen in Container" when prompted. The dev container includes:
- .NET 9.0 SDK
- Qdrant vector database (runs as a sidecar service, no setup needed)
- GitHub CLI, GitHub Copilot CLI, and Claude Code CLI

### Qdrant Vector Database

Qdrant runs automatically as a Docker Compose service in the dev container. It stores vector embeddings for semantic search across telemetry data. Collections (`otel_logs`, `otel_traces`, `otel_metrics`) are created automatically when you first run LogisticsSim.

### Authentication

After the container starts, authenticate the CLI tools:

**GitHub CLI** (required for GitHub Copilot):
```bash
gh auth login
```

**GitHub Copilot CLI**:
```bash
copilot # then use /login
```

**Claude Code CLI** (optional):
```bash
# Ensure claude is in your PATH (already in .bashrc, but run if needed)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc

# Authenticate
claude
```

### Azure OpenAI Configuration

You will need an OpenAI-compatible embedding model. The code assumes you're using one hosted in Azure.

Create local config files with your Azure OpenAI credentials:

```bash
# For LogisticsSim
cat > src/LogisticsSim/appsettings.local.json < src/TelemetryChat/appsettings.local.json < /logs errors
> /logs errors within the last 30 minutes
> /traces slow database
> /metrics request duration
> /all performance issues
```

## Build and Test

```bash
dotnet build # Build solution
dotnet test # Run tests
```

## Project Structure

```
src/
├── VectorExporter/ # Core library - OTel exporters with vector embeddings
├── VectorExporter.Tests/ # Unit tests
├── TelemetryChat/ # Chat interface for querying telemetry
└── LogisticsSim/ # Sample telemetry generator
```

## License

MIT