This service acts as an API Gateway using YARP (Yet Another Reverse Proxy) to route traffic to various microservices.
- Routing API requests to appropriate microservices
- Distributed tracing with OpenTelemetry
- Metrics collection with OpenTelemetry
- Integration with Jaeger for visualizing traces
The application is configured to export telemetry data to Jaeger. The configuration is managed through:
-
Environment variables:
OTEL_EXPORTER_ENDPOINT
: The endpoint for the OpenTelemetry collector (default: http://localhost:4317)
-
Application settings (
appsettings.json
):"OpenTelemetry": { "ServiceName": "ApiGateway", "EnableConsoleExporter": false, "OtlpExporter": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc" } }
cd ApiGatewayApp
docker-compose up
After starting, you can:
- Access the API Gateway at http://localhost:8080
- Access Swagger UI at http://localhost:8080/swagger
- View traces in Jaeger UI at http://localhost:16686
This application includes a render.yaml
Blueprint file for easy deployment to Render.com.