Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Cosmos Diagnostics FormatterNew to Visual Studio Code? Get it now.
Cosmos Diagnostics Formatter

Cosmos Diagnostics Formatter

jasonhumsft

|
13 installs
| (2) | Free
Tool to extract Cosmos DB diagnostics from log file and format it for better readability.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Cosmos Diagnostics Formatter

A Visual Studio Code extension designed to streamline the extraction and formatting of Cosmos DB diagnostics from log files.

Overview

Cosmos DB SDK diagnostics are essential for troubleshooting connectivity and service availability issues. However, these diagnostics are often embedded within unstructured logs, making it challenging to locate and interpret critical details. Additionally, diagnostics strings may be quoted or escaped, further complicating their readability.

Cosmos Diagnostics Formatter addresses these challenges by extracting valid diagnostics strings in JSON format, unescaping or unquoting them as needed, and presenting them in a clean, readable structure.

Features

  • Log Parsing: Extracts Cosmos DB diagnostics strings from JSON, CSV, or plain text log files.
  • Diagnostics Correction: Identifies and fixes incomplete or invalid diagnostics strings to ensure valid information can still be extracted.
  • Simplified Output: Removes unnecessary quoting or escaping to enhance clarity.
  • Readable Formatting: Converts diagnostics into a well-structured JSON format for easier analysis.

Available Commands

The Cosmos Diagnostics Formatter extension provides the following commands to enhance your workflow:

  • Cosmos Diagnostics: Extract and Format: Use this command for most plain-text log files generated by applications. It is ideal for completed log files where diagnostics information can be directly extracted and formatted.

  • Cosmos Diagnostics: Extract, Fix and Format: Use this command for CSV log files exported from platforms like Log Analytics Workspace. It is suitable for incomplete log files containing partial diagnostics information or when the first command fails to extract the desired diagnostics. This command extracts diagnostics information on best effort.

These commands can be accessed via the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) or through the extension's context menu.

Limitations

This extension provides a best-effort approach to extract and format diagnostics information. However, it may not include all original error messages. For complete context, always refer to the original log file.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft