【问题标题】:aspnetcore and applicationinsights.tracelisteneraspnetcore 和 applicationinsights.tracelistener
【发布时间】:2016-10-20 05:09:33
【问题描述】:

在使用 aspnetcore 和/或任何 .net 核心应用程序时,是否可以使用应用程序洞察跟踪日志记录/搜索?

我能够添加 applicationinsights.aspnetcore nuget,但它似乎没有跟踪日志记录的功能。

似乎 tracelistener nuget 包需要完整的 .net。人们如何对 dotnetcore 代码进行跟踪记录/搜索?

【问题讨论】:

    标签: asp.net-core system.diagnostics azure-application-insights


    【解决方案1】:

    Application Insights ASP.NET Core nuget 添加了自动跟踪 Web 应用程序中的请求和异常的功能。 但是,您可以使用 Application Insights 核心遥测 API 发送自定义遥测,例如跟踪或自定义事件。

    请参阅core telemetry API documentation 了解如何操作 - 具体而言,您需要使用 TelemetryClient 类的 TrackTrace 方法。

    希望这会有所帮助,

    阿萨夫

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-19
      相关资源
      最近更新 更多