| | | 1 | | namespace ArturRios.Util.WebApi.Middleware; |
| | | 2 | | |
| | | 3 | | /// <summary>Options for <see cref="TraceActivityMiddleware"/>. Register them with |
| | | 4 | | /// <c>services.Configure<TraceActivityOptions>(...)</c>, or through <c>WebApiStartupOptions.TraceActivity</c>.</s |
| | | 5 | | public 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> |
| | 150 | 9 | | 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> |
| | 119 | 13 | | public bool TagClientAddress { get; set; } = true; |
| | | 14 | | } |