Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.64 KB

File metadata and controls

56 lines (39 loc) · 1.64 KB

Quotes Analytics Service (.NET)

.NET 10 service providing quote analytics with OpenTelemetry auto-instrumentation and custom telemetry.

Features

  • Analyzes quotes for word count, sentiment, and categorization
  • Custom OpenTelemetry spans and metrics (5 metrics, 7 spans)
  • In-memory caching for performance
  • RESTful API: /api/analytics (all/single/summary), /internal/health, /internal/ready

See INSTRUMENTATION.md for telemetry details

Quick Start

Prerequisites: mise or .NET 10 SDK, Docker

# Using mise (recommended)
mise install                    # Install .NET 10
mise run build                  # Build
mise run test                   # Run tests
mise run run                    # Start service

# Or with .NET CLI
dotnet restore quotes-analytics.sln
dotnet build quotes-analytics.sln
dotnet run

# Start with Docker Compose
docker-compose up -d quotes-analytics

Service runs at http://localhost:8081

Development Commands

mise run test              # All tests
mise run test:unit         # Unit tests only
mise run test:integration  # Integration tests
mise run test:coverage     # With coverage
mise run watch             # Hot reload
mise run lint              # Format & build checks
mise run ci                # Full CI pipeline

Run mise tasks to see all available commands.

Deployment

Automatically deployed to NAIS dev-gcp on push to main. Config: .nais/app.yaml (auto-instrumentation enabled, 1-2 replicas, 128-256Mi memory)

Observability

Grafana at http://localhost:3000: Explore → Tempo (traces), Prometheus (quotes_* metrics), Loki (logs)