Skip to content

Adding observability#9

Merged
dewitt4 merged 2 commits intomainfrom
observability
Oct 27, 2025
Merged

Adding observability#9
dewitt4 merged 2 commits intomainfrom
observability

Conversation

@dewitt4
Copy link
Copy Markdown
Contributor

@dewitt4 dewitt4 commented Oct 27, 2025

No description provided.

@dewitt4 dewitt4 self-assigned this Oct 27, 2025
Copilot AI review requested due to automatic review settings October 27, 2025 20:15
@dewitt4 dewitt4 added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 27, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a comprehensive observability system for the FluxAI Gateway, adding Prometheus metrics collection, OpenTelemetry distributed tracing, and structured logging with trace correlation.

Key Changes:

  • Enhanced metrics collection with 15+ new metrics covering requests, costs, cache performance, and model health
  • Added OpenTelemetry-based distributed tracing middleware with support for OTLP export
  • Implemented structured JSON logging with automatic trace ID correlation

Reviewed Changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/services/metrics.py Enhanced metrics service with additional collectors, region support, and new methods for tracking errors, model health, and cache savings
app/middleware/tracing.py New OpenTelemetry tracing middleware providing context managers for tracing requests, Bedrock calls, cache lookups, and other operations
app/middleware/logging.py New structured logging middleware with JSON output and trace correlation for requests, responses, errors, and cache events
app/middleware/init.py New middleware package initialization
app/core/config.py Added configuration for OTLP endpoint and logging options
app/api/v1/endpoints/metrics.py New API endpoints for exposing Prometheus metrics and health checks
README.md Updated documentation to reference new observability system
OBSERVABILITY.md Comprehensive documentation covering metrics reference, tracing guide, logging guide, Grafana dashboards, and alerting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/middleware/tracing.py Outdated
@dewitt4 dewitt4 merged commit 01f48dd into main Oct 27, 2025
@dewitt4 dewitt4 deleted the observability branch October 27, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants