38 lines
1.2 KiB
C#
Executable File
38 lines
1.2 KiB
C#
Executable File
namespace Opsoft.NetCore.O3App.Shared
|
|
{
|
|
public class TraceIdOptions
|
|
{
|
|
public const string DefaultHeader = "apm-traceid";
|
|
|
|
/// <summary>
|
|
/// The name of the header from which the Trace ID is read/written.
|
|
/// </summary>
|
|
public string Header { get; set; } = DefaultHeader;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Controls whether the Trace ID is returned in the response headers.
|
|
/// </para>
|
|
/// <para>Default: true</para>
|
|
/// </summary>
|
|
public bool IncludeInResponse { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Controls whether the ASP.NET Core TraceIdentifier will be set to match the TraceId.
|
|
/// </para>
|
|
/// <para>Default: true</para>
|
|
/// </summary>
|
|
public bool UpdateTraceIdentifier { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Controls whether a GUID will be used in cases where no Trace ID is retrieved from the request header.
|
|
/// When false the TraceIdentifier for the current request will be used.
|
|
/// </para>
|
|
/// <para> Default: true.</para>
|
|
/// </summary>
|
|
public bool UseGuidForTraceId { get; set; } = true;
|
|
}
|
|
}
|