< Summary

Information
Class: ArturRios.Util.WebApi.Middleware.TraceActivityOptions
Assembly: ArturRios.Util.WebApi
File(s): /home/runner/work/dotnet-webapi-util/dotnet-webapi-util/src/Middleware/TraceActivityOptions.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 14
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 2
Fully covered methods: 2
Total methods: 2
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_LogClientIp()100%11100%
get_TagClientAddress()100%11100%

File(s)

/home/runner/work/dotnet-webapi-util/dotnet-webapi-util/src/Middleware/TraceActivityOptions.cs

#LineLine coverage
 1namespace ArturRios.Util.WebApi.Middleware;
 2
 3/// <summary>Options for <see cref="TraceActivityMiddleware"/>. Register them with
 4/// <c>services.Configure&lt;TraceActivityOptions&gt;(...)</c>, or through <c>WebApiStartupOptions.TraceActivity</c>.</s
 5public class TraceActivityOptions
 6{
 7    /// <summary>Whether the client's IP address is included in the "Started request" log entry. When
 8    /// <see langword="false"/>, the entry carries only the trace id. Defaults to <see langword="true"/>.</summary>
 1509    public bool LogClientIp { get; set; } = true;
 10
 11    /// <summary>Whether the client's IP address is tagged on the request's activity as <c>client.address</c>, so
 12    /// tracing backends receive it. Defaults to <see langword="true"/>.</summary>
 11913    public bool TagClientAddress { get; set; } = true;
 14}