Byndyusoft.AspNetCore.Instrumentation.Tracing
Instrumentation tracing
ASP.NET核心MVC跟踪。
dotnet add package Byndyusoft.AspNetCore.Instrumentation.Tracing public class Startup
{
public void ConfigureServices ( IServiceCollection services )
{
services . AddControllers ( )
. AddTracing ( ) ;
.. .
}
} public class Startup
{
public void ConfigureServices ( IServiceCollection services )
{
services . AddControllers ( )
. AddTracing ( options =>
{
options . TagRequestParamsInTrace = true ;
options . EnrichLogsWithParams = true ;
options . EnrichLogsWithHttpInfo = true ;
options . ValueMaxStringLength = 50 ;
options . Formatter = new SystemTextJsonFormatter
{
Options = new JsonSerializerOptions ( JsonSerializerDefaults . Web )
{
Converters =
{
new JsonStringEnumConverter ( )
}
}
} ;
} ) ;
.. .
}
}有一些默認選項參數:
蒙版序列化軟件包byndyusoft.maskedSerialization用於隱藏敏感數據。它是否在newtonsoftjsonformatter.cs類中實現。
為了做出貢獻,您需要設置本地環境,請參閱先決條件。有關貢獻和工作流程指南,請參閱包裝開發生命週期。
有關如何貢獻的詳細概述可以在貢獻指南中找到。
確保您已經在開發機上安裝了以下所有先決條件:
src中實現軟件包邏輯tests中添加或添加或附加單位測試(與編碼之前和同時使用編碼)master分支