About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_first
⚠️
missing_linux_example
Summary:
The documentation provides both Bash and PowerShell examples for querying logs, but the Bash examples use the non-standard 'SET' command for variable assignment, which is a Windows CMD syntax, not valid in Bash or Linux shells. This can confuse Linux users. Additionally, PowerShell examples are always present, and the variable assignment is shown first with 'SET' (Windows) before PowerShell, indicating a Windows-first approach. There are no explicit Linux-native (e.g., export, or POSIX-compliant) examples, and no mention of Linux-specific tools or patterns.
Recommendations:
- Replace 'SET $WORKSPACE_ID=<WORKSPACE_ID>' in Bash examples with 'export WORKSPACE_ID=<WORKSPACE_ID>' to use standard Linux shell syntax.
- Ensure Bash/Linux examples are correct and tested in a Linux environment.
- Consider listing Bash/Linux examples before PowerShell/Windows examples to avoid a Windows-first impression.
- Explicitly mention compatibility with Linux and provide troubleshooting tips for common Linux shell issues.
- If possible, add examples using other common Linux tools (e.g., curl, jq) where appropriate.
Create pull request
Flagged Code Snippets
$WORKSPACE_ID = "<WORKSPACE_ID>"
$queryResults = Invoke-AzOperationalInsightsQuery -WorkspaceId $WORKSPACE_ID -Query "ContainerAppSystemLogs_CL | where ComponentType_s == 'SpringCloudEureka' | project Time=TimeGenerated, Type=ComponentType_s, Component=ComponentName_s, Message=Log_s | take 5"
$queryResults.Results
$WORKSPACE_ID = "<WORKSPACE_ID>"
$queryResults = Invoke-AzOperationalInsightsQuery -WorkspaceId $WORKSPACE_ID -Query "ContainerAppSystemLogs | where ComponentType == 'SpringCloudEureka' | project Time=TimeGenerated, Type=ComponentType, Component=ComponentName, Message=Log | take 5"
$queryResults.Results