Skip to content

Comments

feat: migrate to structlog in AWS integration#1061

Merged
gcharest merged 1 commit intomainfrom
feat/migrate_integration_aws_logger
Feb 2, 2026
Merged

feat: migrate to structlog in AWS integration#1061
gcharest merged 1 commit intomainfrom
feat/migrate_integration_aws_logger

Conversation

@gcharest
Copy link
Contributor

@gcharest gcharest commented Feb 2, 2026

Summary | Résumé

This pull request refactors logging across multiple AWS integration modules to use structlog instead of the previous custom logger. The changes standardize logging practices, improve log context by binding relevant metadata, and enhance the clarity and maintainability of log messages. The refactor touches all major AWS integration modules, updating both initialization and usage patterns for logging.

Logging infrastructure refactor:

  • Replaced the custom logger initialization (get_module_logger) with structlog.get_logger() in all AWS integration modules, including client.py, client_next.py, config.py, cost_explorer.py, dynamodb.py, dynamodb_next.py, and guard_duty.py. [1] [2] [3] [4] [5] [6] [7]

Improved log context and structure:

  • Updated all log statements to use log = logger.bind(...) for contextual metadata (such as operation, service, table, etc.), and replaced direct logger calls with the bound logger (log.debug, log.error, etc.). This change is applied consistently across error handling, API call lifecycle, and AWS resource operations. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22]

Consistent error and status logging:

  • Standardized error, warning, and info logs to use the bound logger and include relevant metadata, improving the ability to trace issues and monitor AWS API interactions. [1] [2] [3] [4] [5]

AWS resource operation logging:

Codebase consistency and maintainability:

  • Removed redundant logger arguments and ensured all logging follows a consistent pattern, improving readability and maintainability across the AWS integration codebase. [1] [2] [3] [4] [5] [6] [7]

@gcharest gcharest requested a review from a team February 2, 2026 18:21
@gcharest gcharest self-assigned this Feb 2, 2026
@gcharest gcharest enabled auto-merge (squash) February 2, 2026 18:21
@gcharest gcharest merged commit 9e9d633 into main Feb 2, 2026
9 checks passed
@gcharest gcharest deleted the feat/migrate_integration_aws_logger branch February 2, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants