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

Exposing Structured Debug information on the CosmosDiagnostics class #4728

Open
albertofori opened this issue Sep 27, 2024 · 0 comments
Open
Labels
customer-reported Issue created by a customer needs-investigation
Milestone

Comments

@albertofori
Copy link
Member

Is your feature request related to a problem? Please describe.
The only way to get diagnostics information relevant to issues is by inspecting a long string created by the ToString() method of the CosmosDiagnostics class. Having to log this string can be problematic to as we have come across issues whereby log buffers can overflow resulting in broken/incomplete logs.
We are therefore forced to log the only publicly exposed properties e.g, (query metrics, client elapsed time etc.), which have proven to be insufficient for debugging when some issues arise.

Describe the solution you'd like
Expose relevant information for debugging as public properties that can be included in structured logging and supplied as and when they are needed. For instance, information on the exception thrown, replica endpoints that are hit, command type, etc. can be exposed as properties that can be logged in a structured manner.

 
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

  • Logging exposed properties on CosmosDiagnostics class. Eg., Index hit ratio and various latency values. These have proven to be insufficient in the event where certain potential service issues are encountered. Recently reported issues have required us to present full diagnostics strings to effectuate investigations, and logging these have been problematic in the past..
  • Truncating diagnostics strings to avoid logging diagnostics data that could be potentially unbounded. However, some data could be lost

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issue created by a customer needs-investigation
Projects
None yet
Development

No branches or pull requests

2 participants