-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[TT-16266] Add debug logging to API definition compression logic #7720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add verbose debug logging to help diagnose issues with the compress_api_definitions feature not being triggered in customer environments. The new logs trace the execution path and show the runtime configuration value. New debug messages: - Entry into saveRPCDefinitionsBackup function - CompressAPIDefinitions flag value before calling compressAPIBackup - Entry into compressAPIBackup function Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🚨 Jira Linter FailedCommit: The Jira linter failed to validate your PR. Please check the error details below: 🔍 Click to view error detailsNext Steps
This comment will be automatically deleted once the linter passes. |
|
API Changes no api changes detected |
|
This PR introduces debug-level logging to the API definition compression logic to improve traceability for a feature that has been difficult for users to troubleshoot. Files Changed Analysis
Architecture & Impact Assessment
graph TD
A[API Reload / Gateway Start] --> B{APIDefinitionLoader.FromRPC};
B --> C{store.GetApiDefinitions};
C --> D{"rpc.LoadCount() > 0?"};
D -- Yes --> E[gw.saveRPCDefinitionsBackup];
E -- logs --> F[Entered saveRPCDefinitionsBackup];
E --> G{gw.compressAPIBackup};
G -- logs --> H[Calling compressAPIBackup with flag value];
G -- logs --> I[Entered compressAPIBackup];
Scope Discovery & Context ExpansionThe changes are localized to the The trigger for this entire flow is an API reload or a gateway startup, which causes the gateway to fetch all its assigned API definitions. The new logging will therefore be visible in these scenarios, providing crucial diagnostic information without affecting the core logic of compression or data persistence. Metadata
Powered by Visor from Probelabs Last updated: 2026-01-31T18:39:16.870Z | Triggered by: pr_opened | Commit: 6b37491 💡 TIP: You can chat with Visor using |
✅ Security Check PassedNo security issues found – changes LGTM. ✅ Architecture Check PassedNo architecture issues found – changes LGTM. ✅ Performance Check PassedNo performance issues found – changes LGTM. ✅ Quality Check PassedNo quality issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2026-01-31T18:39:19.510Z | Triggered by: pr_opened | Commit: 6b37491 💡 TIP: You can chat with Visor using |
|



Summary
[RPC-DEBUG]log messages at entry points ofsaveRPCDefinitionsBackupandcompressAPIBackupfunctionsCompressAPIDefinitionsflag to help diagnose configuration issuesContext
This addresses customer troubleshooting needs for the
compress_api_definitionsfeature (TT-16266). Users have reported that the feature does not appear to be triggered in their local environments, with no debug logs appearing even when the feature is enabled.The new logs will help determine:
saveRPCDefinitionsBackupis being called during API reloadsCompressAPIDefinitionsconfiguration flagcompressAPIBackupis being invokedTest plan
log_level: "debug"andcompress_api_definitions: truein tyk.conf[RPC-DEBUG] ==> Entered saveRPCDefinitionsBackup[RPC-DEBUG] ==> Calling compressAPIBackup with CompressAPIDefinitions flag set to: true[RPC-DEBUG] ==> Entered compressAPIBackup🤖 Generated with Claude Code
Ticket Details
TT-16266
Generated at: 2026-01-31 18:37:44