Skip to content
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

Implement Correlation IDs for Enhanced Logging and Tracing #146

Open
monilpat opened this issue Dec 25, 2024 · 0 comments
Open

Implement Correlation IDs for Enhanced Logging and Tracing #146

monilpat opened this issue Dec 25, 2024 · 0 comments
Labels
enhancement New feature or request logging tracing

Comments

@monilpat
Copy link
Collaborator

Feature Request

Is your feature request related to a problem? Please describe.

The current logging system lacks correlation IDs, making it challenging to trace requests across distributed services and identify the root cause of issues.

Describe the solution you'd like

Introduce correlation IDs in the logging framework to enhance observability and traceability. This should include:

  • Generating a unique correlation ID for each request and propagating it across all services involved in handling the request.
  • Including the correlation ID in all log entries related to the request to provide a comprehensive trace.
  • Providing utilities to extract and log correlation IDs in existing logging statements.

Code Example

// Example of adding correlation ID to a log entry
logger.info('Processing request', { correlationId: req.correlationId });

Describe alternatives you've considered

  • Using custom headers or metadata to track requests manually, which is error-prone and inconsistent.
  • Relying solely on existing log messages, which do not provide the needed traceability.

Additional context

Implementing correlation IDs will significantly improve the ability to trace and debug complex interactions in distributed environments, enhancing both monitoring and troubleshooting capabilities.

Related Issues

@monilpat monilpat added enhancement New feature or request logging tracing labels Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logging tracing
Projects
None yet
Development

No branches or pull requests

1 participant