{"id":13430221,"url":"https://github.com/prom-client-net/prom-client-metricserver","last_synced_at":"2026-01-12T10:52:02.592Z","repository":{"id":40384411,"uuid":"90423331","full_name":"prom-client-net/prom-client-metricserver","owner":"prom-client-net","description":"Standalone Kestrel server","archived":false,"fork":false,"pushed_at":"2025-12-13T04:04:15.000Z","size":397,"stargazers_count":15,"open_issues_count":1,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-14T16:40:18.401Z","etag":null,"topics":["metrics","prometheus","prometheus-client"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prom-client-net.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"phnx47","ko_fi":"phnx47","buy_me_a_coffee":"phnx47"}},"created_at":"2017-05-05T23:06:02.000Z","updated_at":"2025-12-13T04:04:18.000Z","dependencies_parsed_at":"2024-01-02T22:44:38.681Z","dependency_job_id":"9ded0f21-b247-453a-9b26-0c3b3bd9233c","html_url":"https://github.com/prom-client-net/prom-client-metricserver","commit_stats":null,"previous_names":["prometheusclientnet/prometheus.client.metricserver"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/prom-client-net/prom-client-metricserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prom-client-net%2Fprom-client-metricserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prom-client-net%2Fprom-client-metricserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prom-client-net%2Fprom-client-metricserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prom-client-net%2Fprom-client-metricserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prom-client-net","download_url":"https://codeload.github.com/prom-client-net/prom-client-metricserver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prom-client-net%2Fprom-client-metricserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:40:25.642Z","status":"ssl_error","status_checked_at":"2026-01-12T10:39:27.820Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["metrics","prometheus","prometheus-client"],"created_at":"2024-07-31T02:00:51.180Z","updated_at":"2026-01-12T10:52:02.584Z","avatar_url":"https://github.com/prom-client-net.png","language":"C#","funding_links":["https://github.com/sponsors/phnx47","https://ko-fi.com/phnx47","https://buymeacoffee.com/phnx47"],"categories":["Frameworks, Libraries and Tools"],"sub_categories":["Code Analysis and Metrics"],"readme":"# Prometheus.Client.MetricServer\n\n[![ci](https://img.shields.io/github/actions/workflow/status/prom-client-net/prom-client-metricserver/ci.yml?branch=main\u0026label=ci\u0026logo=github\u0026style=flat-square)](https://github.com/prom-client-net/prom-client-metricserver/actions/workflows/ci.yml)\n[![nuget](https://img.shields.io/nuget/v/Prometheus.Client.MetricServer?logo=nuget\u0026style=flat-square)](https://www.nuget.org/packages/Prometheus.Client.MetricServer)\n[![nuget](https://img.shields.io/nuget/dt/Prometheus.Client.MetricServer?logo=nuget\u0026style=flat-square)](https://www.nuget.org/packages/Prometheus.Client.MetricServer)\n[![codecov](https://img.shields.io/codecov/c/github/prom-client-net/prom-client-metricserver?logo=codecov\u0026style=flat-square)](https://app.codecov.io/gh/prom-client-net/prom-client-metricserver)\n[![license](https://img.shields.io/github/license/prom-client-net/prom-client-metricserver?style=flat-square)](https://github.com/prom-client-net/prom-client-metricserver/blob/main/LICENSE)\n\nExtension for [Prometheus.Client](https://github.com/prom-client-net/prom-client)\n\n## Install\n\n```sh\ndotnet add package Prometheus.Client.MetricServer\n```\n\n## Use\n\n[Examples](https://github.com/prom-client-net/prom-examples)\n\nSimple Console App with static MetricFactory:\n\n```c#\npublic static void Main(string[] args)\n{\n    var options = new MetricServerOptions\n    {\n        Port = 9091\n    };\n\n    var metricServer = new MetricServer(options);\n    metricServer.Start();\n\n    var counter = Metrics.DefaultFactory.CreateCounter(\"test_count\", \"helptext\");\n    counter.Inc();\n\n    metricServer.Stop();\n}\n\n```\n\nWorker with DI [Prometheus.Client.DependencyInjection](https://github.com/prom-client-net/prom-client-dependencyinjection):\n\n```c#\npublic static async Task Main(string[] args)\n{\n    var host = Host.CreateDefaultBuilder(args)\n        .ConfigureServices((_, services) =\u003e\n        {\n            services.AddMetricFactory();\n            services.AddSingleton\u003cIMetricServer\u003e(sp =\u003e new MetricServer(\n                new MetricServerOptions\n                {\n                    CollectorRegistry = sp.GetRequiredService\u003cICollectorRegistry\u003e(),\n                    UseDefaultCollectors = true\n                }));\n            services.AddHostedService\u003cWorker\u003e();\n        }).Build();\n\n    var metricServer = host.Services.GetRequiredService\u003cIMetricServer\u003e();\n\n    try\n    {\n        metricServer.Start();\n        await host.RunAsync();\n    }\n    catch (Exception ex)\n    {\n        Console.WriteLine(\"Host Terminated Unexpectedly\");\n    }\n    finally\n    {\n        metricServer.Stop();\n    }\n}\n\n```\n\n## License\n\nAll contents of this package are licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprom-client-net%2Fprom-client-metricserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprom-client-net%2Fprom-client-metricserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprom-client-net%2Fprom-client-metricserver/lists"}