-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add error logs query in Azure #1192
Conversation
Quality Gate passedIssues Measures |
display_name = "TI's Raw Application Logs" | ||
description = "View all TI's application logs in a structured format" | ||
|
||
query_pack_id = azurerm_log_analytics_query_pack.application_logs_pack.id | ||
categories = ["applications"] | ||
|
||
body = "AppServiceConsoleLogs | extend JsonResult = parse_json(ResultDescription) | project-away TimeGenerated, Level, ResultDescription, Host, Type, _ResourceId, OperationName, TenantId, SourceSystem | evaluate bag_unpack(JsonResult)" | ||
body = "AppServiceConsoleLogs | project JsonResult = parse_json(ResultDescription) | evaluate bag_unpack(JsonResult) | project-reorder ['@timestamp'], level, message" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we are no longer removing the TimeGenerated, Level, ResultDescription, Host, Type, _ResourceId, OperationName, TenantId, SourceSystem
items from the logs? I'm under the impression that those are worthless columns that don't give us any benefit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because those columns are not included in the results anymore, so there is no need to remove them. I think the way the query was built before using extend
was including those columns, but I changed that to use project
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! Hardcore!
LOGGER.logInfo("Info"); | ||
LOGGER.logWarning("Warning"); | ||
LOGGER.logDebug("Debug"); | ||
LOGGER.logError("Error"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent.
Add error logs query in Azure
TI's Raw Application Logs
to simplify query and reorder columnsIssue
#1143