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分支