fix: replace print() with logger.error() in analytics service - #2
Open
DivyashreeR008 wants to merge 2 commits into
Open
fix: replace print() with logger.error() in analytics service#2DivyashreeR008 wants to merge 2 commits into
DivyashreeR008 wants to merge 2 commits into
Conversation
The analytics service used print() instead of a proper logger when database engine creation failed. This bypassed structured logging, log levels, and the observability pipeline. Changes: - Replaced print() with logger.error() using structured logging format This ensures: - Log output is structured JSON - Logs can be filtered by log level - Logs pass through atlas_observability logging middleware - Logs are captured by log aggregation tools like Loki
DivyashreeR008
pushed a commit
that referenced
this pull request
Jun 17, 2026
add: Authentication/Authorization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaced print() with logger.error() in the analytics service's production code to use structured logging through the observability pipeline.
Changes
n- **Before**: print(f"Error creating engine: {e}")n- After: logger.error("analytics.engine_creation_failed", extra={"error": str(e)})`nImpact
Closes Senthil455#66