Skip to content

Added request ID contract and tracing developer guide #573#644

Open
Apoorv-Raj777 wants to merge 5 commits into
utksh1:mainfrom
Apoorv-Raj777:issue-#573
Open

Added request ID contract and tracing developer guide #573#644
Apoorv-Raj777 wants to merge 5 commits into
utksh1:mainfrom
Apoorv-Raj777:issue-#573

Conversation

@Apoorv-Raj777
Copy link
Copy Markdown

Related Issues

Closes #573

Description

This PR introduces comprehensive contributor-facing documentation for the request ID tracing contract in SecuScan. The documentation explains how request IDs are generated (via ContextVar and uuid4), how they pass through middleware (RequestIDMiddleware), how they correlate across application logs (using JSONFormatter), and how they are stored within database audit logs (audit_log table JSON context). Additionally, developer-facing guidelines on background task propagation and end-to-end debugging guides are provided. Links to the documentation have also been integrated into relevant development guides and source files.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Verified that all paths and linked code references in the documentation match the implemented behavior in the codebase.
  • Ran Python syntax validation (py_compile) on the updated backend/secuscan/request_middleware.py middleware file to ensure no syntax issues were introduced.
  • Reviewed markdown rendering of links and contents.

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

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.

[DOCS] Document request ID propagation and log-correlation expectations

1 participant