diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54abb68..512f1ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -226,7 +226,7 @@ jobs: cache: pip - name: Install dependencies - run: pip install fastapi uvicorn httpx pytest pytest-cov pydantic prometheus-fastapi-instrumentator + run: pip install fastapi uvicorn httpx pytest pytest-cov pydantic prometheus-fastapi-instrumentator structlog prometheus-fastapi-instrumentator structlog - name: Run Assignment 12 tests working-directory: "Assignment 12" diff --git a/Assignment 12/api/logging_config.py b/Assignment 12/api/logging_config.py index ff0fb73..79fc351 100644 --- a/Assignment 12/api/logging_config.py +++ b/Assignment 12/api/logging_config.py @@ -1,5 +1,4 @@ import structlog -import logging import sys def configure_logging(): @@ -20,4 +19,4 @@ def configure_logging(): ) def get_logger(name: str = __name__): - return structlog.get_logger(name) \ No newline at end of file + return structlog.get_logger(name) diff --git a/Assignment 12/handlers/routes/transactions.py b/Assignment 12/handlers/routes/transactions.py index d5bc560..11debe3 100644 --- a/Assignment 12/handlers/routes/transactions.py +++ b/Assignment 12/handlers/routes/transactions.py @@ -103,7 +103,7 @@ def submit_transaction( ) # ── Increment metrics ── transactions_total.labels(channel=body.channel).inc() - + return TransactionResponse.from_domain(txn) except Exception as e: raise _handle_service_errors(e) diff --git a/requirements.txt b/requirements.txt index abc82cc..d5ab514 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,4 +16,4 @@ pydantic==2.10.3 # Build / packaging (CD pipeline) build==1.2.2 -wheel==0.45.1 \ No newline at end of file +wheel==0.45.1structlog