public async Task InvokeAsync(HttpContext context)
        {
            if (!context.Request.Path.StartsWithSegments(_options.PathMatch))
            {
                await _next(context);

                return;
            }
            var mapping = _instanceCache.GetAll()
                          .Select(kv => new StaticInstanceEntry
            {
                ServiceName = kv.Key,
                Instances   = kv.Value.InstanceMap.Values
                              .Select(si =>
                {
                    var entry         = si.ToEntry();
                    entry.ServiceName = null;
                    return(entry);
                })
                              .ToList()
            })
                          .ToList();
            var result = new
            {
                Mapping = mapping
            };
            var option = new JsonSerializerOptions
            {
                WriteIndented    = true,
                IgnoreNullValues = true
            };
            var json = JsonSerializer.Serialize(result, option);
            await context.Response.WriteAsync(json);
        }