This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.AspNetCore.Mvc; | |
public class InvalidModelStateResponseFactory | |
{ | |
public static ProblemDetails Create(ActionContext _) => new(); | |
public class ProblemDetails : IActionResult | |
{ | |
public Task ExecuteResultAsync(ActionContext context) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mapping of .NET Activity Context to W3C TraceContext | |
var traceId = Activity.Current!.ParentId; // W3C 3.2.2.3 trace-id | |
var parentId = Activity.Current!.ParentSpanId; // W3C 3.2.2.4 parent-id | |
var spanId = Activity.Current!.SpanId; // This service's span-id. Will become parent-id of next call |