Implement context-based logger propagation#994
Merged
Conversation
Refactors the logger system to propagate loggers through context across all components. Removes explicit logger parameters in favor of context-based logger retrieval. Updates all cloud service managers, disruption handlers, and test infrastructure to use the new logger context API.
diyarab
approved these changes
Oct 2, 2025
Adds TargetNameKey constant and updates all logging statements to use consistent "targetName" key instead of mixed "target"/"targetName" usage across codebase.
- Add comprehensive logging key constants for disruptions, pods, nodes, and chaos operations - Implement context-based logger propagation throughout controllers, watchers, and services - Move FormatTag to new o11y/tags package for better architectural separation of concerns - Standardize structured logging patterns across all components (controllers, watchers, injectors, webhooks) - Update metrics and event notifiers to use consistent tag formatting patterns
clairecng
reviewed
Oct 7, 2025
clairecng
reviewed
Oct 7, 2025
clairecng
reviewed
Oct 7, 2025
clairecng
approved these changes
Oct 7, 2025
diyarab
reviewed
Oct 9, 2025
Centralized all logging tag keys to use constants from o11y/tags/tags.go, ensuring compliance with Datadog naming conventions (lowercase, underscores). Replaced hardcoded strings across 64 files with typed constants for better maintainability and consistency. Key improvements: - Organized tag constants by functional clusters (generic, events, timing, etc.) - Added 80+ missing tag constants for complete coverage - Removed duplicate constants and mock files - Enhanced observability infrastructure with structured logging 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Jira: CHAOSPLT- 1211
Implement context-based logger propagation across all event notifiers for better observability. Jira: CHAOSPLT-1211
Jira: CHAOSPLT- 1211
Jira: CHAOSPLT- 1211
edznux-dd
reviewed
Oct 15, 2025
Jira: CHAOSPLT-1211
diyarab
approved these changes
Oct 22, 2025
11 tasks
clairecng
approved these changes
Oct 28, 2025
jedddog
approved these changes
Oct 28, 2025
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.
What does this PR do?
Please briefly describe your changes as well as the motivation behind them:
Code Quality Checklist
Testing
unittests orend-to-endtests.unittests orend-to-endtests.Linked to CHAOSPLT-1211