一个类似于DataDog/New Relic的Azure Application Insights仪表板?

huangapple go评论61阅读模式
英文:

An Azure Application Insights dashboard similar to DataDog/New Relic?

问题

在之前的工作场所,我使用过New Relic和最近的DataDog,现在我正在尝试理解Azure的Application Insights。

在Application Insights中,有没有一种方法可以像下面的截图一样查看所有日志,即按日期时间顺序查看所有日志,并能够按自定义值(例如服务名称、日志级别等)进行筛选?

一个类似于DataDog/New Relic的Azure Application Insights仪表板?

英文:

Having used New Relic and more recently DataDog at previous work places, I'm now trying to get my head around Azure's Application Insights.

Is there any way to view all your logs within Application Insights in a similar dashboard to the screenshot below i.e. view all your logs in a datetime order and be able to filter by custom values e.g. service name, log level etc.?

一个类似于DataDog/New Relic的Azure Application Insights仪表板?

答案1

得分: 1

Azure Application Insights提供了一套丰富的工具,用于监视、分析和可视化日志数据,尽管UI可能与New Relic和DataDog等平台不同,但功能非常相似。

您可以在Application Insights中查看和筛选日志:

  1. 日志分析

    • 在Azure门户中导航到您的Application Insights资源。
    • 在“监视”部分点击“日志”。这将打开日志分析工作区。
    • 在这里,您可以编写Kusto查询语言(KQL)查询来筛选和分析日志。
  2. 按时间顺序查看日志

    • 在日志分析工作区中,您可以使用以下查询按时间顺序查看跟踪(日志):
      traces
      | order by timestamp desc
      
  3. 按自定义值筛选

    • 您可以使用KQL中的where子句来筛选日志。例如,按特定日志级别筛选日志:

      traces
      | where customDimensions.LogLevel == "Error"
      | order by timestamp desc
      
    • 类似地,按服务名称筛选:

      traces
      | where customDimensions.ServiceName == "MyService"
      | order by timestamp desc
      
  4. 可视化日志

    • 您可以直接从日志分析工作区创建图表、图形和其他可视化表示。
    • 一旦您获得所需的数据,点击结果窗格上方的“图表”图标,选择您想要的可视化类型。
  5. 固定到仪表板

    • 如果您希望持久地查看日志或可视化结果,可以将它们固定到Azure仪表板上。这样,您可以拥有一个自定义仪表板,其中包含您关心的所有日志和指标。
  6. 搜索

    • 这是我最喜欢的功能之一,搜索或事务搜索。Application Insights中的“搜索”功能提供了一种用户友好的方式来搜索各种遥测事件,包括自定义事件、跟踪、异常等。
英文:

Azure Application Insights provides a rich set of tools for monitoring, analyzing, and visualizing log data, although the UI may be different but features are very similar to platforms like New Relic and DataDog.

You can view and filter logs in Application Insights:

  1. Log Analytics:
    • Navigate to your Application Insights resource in the Azure portal.
    • Click on "Logs" in the Monitoring section. This will open the Log Analytics workspace.
    • Here, you can write Kusto Query Language (KQL) queries to filter and analyze your logs.

一个类似于DataDog/New Relic的Azure Application Insights仪表板?

  1. View Logs in Chronological Order:

    • In the Log Analytics workspace, you can use the following query to view traces (logs) in chronological order:
      traces
      | order by timestamp desc
      
  2. Filter by Custom Values:

    • You can filter logs using the where clause in KQL. For example, to filter logs by a specific log level:

      traces
      | where customDimensions.LogLevel == "Error"
      | order by timestamp desc
      
    • Similarly, to filter by service name:

      traces
      | where customDimensions.ServiceName == "MyService"
      | order by timestamp desc
      
  3. Visualizing Logs:

    • You can create charts, graphs, and other visual representations directly from the Log Analytics workspace.
    • Once you have the data you need, click on the "Chart" icon above the results pane and choose the type of visualization you want.
  4. Pin to Dashboard:

    • If you want a persistent view of your logs or visualizations, you can pin them to an Azure dashboard. This way, you can have a custom dashboard with all the logs and metrics that matter to you.
  5. Search:

    • This is one of my most favourite ones, Search or transaction search. The "Search" feature in Application Insights provides a user-friendly way to search across telemetry events, including custom events, traces, exceptions, and more.
      一个类似于DataDog/New Relic的Azure Application Insights仪表板?

答案2

得分: 0

是的,Azure Application Insights提供了一个名为Log Analytics的功能,允许您以灵活的方式查询和查看日志。以下是您可以实现类似于您描述的视图的方法:

访问Log Analytics:

在Azure门户中导航到您的Application Insights资源。
在“监视”部分,单击“日志”。

查询日志:

Application Insights使用一种称为Kusto查询语言(KQL)的查询语言。您可以使用KQL来过滤、排序和分析日志。
例如,要按日期时间顺序查看所有跟踪:

traces
| order by timestamp desc

要按自定义值(如服务名称或日志级别)进行过滤:

traces
| where customDimensions["ServiceName"] == "YourServiceName"
| where severityLevel == "Information"
| order by timestamp desc

自定义您的视图:

您可以将查询结果固定到共享仪表板或导出它们进行进一步分析。
Application Insights还提供了一个名为“工作簿”的功能,允许您基于日志创建自定义交互式报告和可视化。

其他过滤器:

在Log Analytics页面的顶部,有可用于时间范围的过滤器,并且您还可以设置自定义时间范围。
您还可以使用左侧的“模式”窗格来探索日志中可用的不同表和列。

英文:

Yes, Azure Application Insights provides a feature called Log Analytics that allows you to query and view your logs in a flexible manner. Here's how you can achieve a view similar to what you described:

Accessing Log Analytics:

Navigate to your Application Insights resource in the Azure portal.
Under the "Monitoring" section, click on "Logs".
Querying Your Logs:

Application Insights uses a query language called Kusto Query Language (KQL). You can use KQL to filter, sort, and analyze your logs.
For example, to view all your traces in datetime order:

traces
| order by timestamp desc
To filter by custom values like service name or log level:
traces
| where customDimensions["ServiceName"] == "YourServiceName"
| where severityLevel == "Information"
| order by timestamp desc

Customizing Your View:

You can pin query results to a shared dashboard or export them for further analysis.
Application Insights also provides a feature called "Workbooks" which allows you to create custom interactive reports and visualizations based on your logs.
Additional Filters:

On the top of the Log Analytics page, there are filters available for Time Range, and you can also set custom time ranges.
You can also use the "Schema" pane on the left to explore the different tables and columns available in your logs.

huangapple
  • 本文由 发表于 2023年8月9日 01:14:44
  • 转载请务必保留本文链接:https://go.coder-hub.com/76861839.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定