A web API exposing a neural network to detect duplicate entities in knowledge graphs. It uses API key authentication and rate limits requests based on client tiers (FREEMIUM, PREMIUM)
MIT License
0
stars
0
forks
source link
Spike to evaluate logging libraries (`loguru, opentelemetry, uvicorn`) #10
Conduct a spike to evaluate and compare three logging solutions for use within the FastAPI project: Loguru, OpenTelemetry, and Uvicorn. The goal is to determine which solution best suits the project’s needs, considering factors such as ease of use, configurability, log formatting, and integration with FastAPI.
User Stories
As a Developer, I want a reliable, flexible logging library to track application events and errors, so I can troubleshoot and monitor the service efficiently.
As a DevOps Engineer, I want a logging solution compatible with monitoring tools to facilitate error tracking and application performance monitoring.
Details
Objective: Evaluate Loguru, OpenTelemetry, and Uvicorn to determine the best logging solution for the project.
Requirements:
Implement a small example of each library in a FastAPI context.
Log sample messages (e.g., info, warning, error) and observe output format, ease of configuration, and customization options.
Assess the potential for integration with external monitoring or logging systems (e.g., Datadog, Prometheus).
Evaluation Criteria
Ease of Use: How simple it is to set up and use the library.
Configurability: Options for customizing log format, levels, and handling.
Integration: Compatibility with FastAPI and potential for integration with external monitoring solutions.
Performance: Impact on application performance, especially in a production setting.
Features:
Loguru: Known for simplicity and powerful logging with minimal setup.
OpenTelemetry: Popular for distributed tracing and performance monitoring, which may add valuable insights.
Uvicorn Logging: Native logging solution tailored to FastAPI’s default server.
Steps to Perform
Loguru Setup:
Install and configure Loguru in a sample FastAPI route.
Implement log levels (info, debug, error).
Test structured logging and output formatting.
Document ease of configuration and any noteworthy features (e.g., rotating log files).
OpenTelemetry Setup:
Set up OpenTelemetry with FastAPI.
Configure tracing and logging, integrating with a sample trace exporter (e.g., Jaeger).
Test the capability for distributed tracing and correlation of logs with traces.
Evaluate complexity and configuration flexibility.
Uvicorn Logging:
Use Uvicorn’s native logging configuration with FastAPI.
Implement logging with various levels (info, debug, error) and observe outputs.
Document pros and cons, particularly in a FastAPI context, including any limitations or advantages specific to Uvicorn.
Compare and Document Findings:
Summarize findings, with pros and cons for each option.
Include a recommendation based on the evaluation criteria.
Example of Findings Report (Template) for comment this issue
Library
Ease of Use
Configurability
Integration
Performance Impact
Features
Loguru
Easy
High
Limited to logging
Low
Simple setup, powerful formatting
OpenTelemetry
Moderate
High
Excellent for tracing
Moderate
Distributed tracing, good for microservices
Uvicorn
Simple
Limited
Native to FastAPI
Minimal
Basic logging, limited customization
Recommendation: [Choose library based on findings, with a summary of why this library is best suited for the project.]
Description
Conduct a spike to evaluate and compare three logging solutions for use within the FastAPI project: Loguru, OpenTelemetry, and Uvicorn. The goal is to determine which solution best suits the project’s needs, considering factors such as ease of use, configurability, log formatting, and integration with FastAPI.
User Stories
Details
Evaluation Criteria
Steps to Perform
Loguru Setup:
OpenTelemetry Setup:
Uvicorn Logging:
Compare and Document Findings:
Example of Findings Report (Template) for comment this issue
Recommendation: [Choose library based on findings, with a summary of why this library is best suited for the project.]