-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add break mode logging integration to the telemetry system, as defined in Step 8 of specs/telemetry-enhancements.md Section 4.
This was deferred from #34 (PR #37) because break mode middleware is not yet implemented.
Acceptance Criteria
- Add
BreakRuleEntrydataclass tolibs/decorators/metrics.py - Add
break_rule_log: list[BreakRuleEntry]field toTelemetryConfig - Add
* Break:output lines toformat_curl_debug()when break rules are applied to a request - Add
breakrow type toprint_telemetry_block()text renderer - Add
break_rules_appliedfield to JSON debug_call and scenario events - Sensitive value redaction for auth-related break rule mutations using
redact_header_value() - Clear
break_rule_logalongsidemethod_timingsafter rendering - Unit tests for all rendering paths with synthetic
BreakRuleEntrydata
Design Reference
See specs/telemetry-enhancements.md Section 4: Break Mode Logging Integration.
Expected text output in --debug-calls:
* Break: invalid_content_type — replaced Content-Type
* original: application/vnd.oci.image.manifest.v1+json
* mutated: text/plain
Expected telemetry block row:
break invalid_content_type 1 applied
Files to Create/Modify
libs/decorators/metrics.py— AddBreakRuleEntrydataclasslibs/decorators/__init__.py— Addbreak_rule_logtoTelemetryConfig, exportBreakRuleEntrylibs/decorators/call_details.py— Add break rule lines toformat_curl_debug()andformat_curl_debug_json()libs/decorators/output.py— Add break row rendering to text and JSON rendererslibs/decorators/scenario.py— Pass break entries toprint_telemetry_block()tests/test_break_mode_telemetry.py— New test file
Dependencies
- Break mode middleware implementation (will populate
break_rule_logduring request processing)
References
specs/telemetry-enhancements.mdSection 4- PR Enhanced Telemetry and Debug Features #37 (parent implementation)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request