VOOZH about

URL: https://www.nuget.org/packages/Prometheus.Client.MetricServer/

⇱ NuGet Gallery | Prometheus.Client.MetricServer 7.0.0




👁 Image
Prometheus.Client.MetricServer 7.0.0

Prefix Reserved
dotnet add package Prometheus.Client.MetricServer --version 7.0.0
 
 
NuGet\Install-Package Prometheus.Client.MetricServer -Version 7.0.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Prometheus.Client.MetricServer" Version="7.0.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Prometheus.Client.MetricServer" Version="7.0.0" />
 
Directory.Packages.props
<PackageReference Include="Prometheus.Client.MetricServer" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Prometheus.Client.MetricServer --version 7.0.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Prometheus.Client.MetricServer, 7.0.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Prometheus.Client.MetricServer@7.0.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Prometheus.Client.MetricServer&version=7.0.0
 
Install as a Cake Addin
#tool nuget:?package=Prometheus.Client.MetricServer&version=7.0.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Prometheus.Client.MetricServer

👁 ci
👁 nuget
👁 nuget
👁 codecov
👁 license

Extension for Prometheus.Client

Install

dotnet add package Prometheus.Client.MetricServer

Use

Examples

Simple Console App with static MetricFactory:

public static void Main(string[] args)
{
 var options = new MetricServerOptions
 {
 Port = 9091
 };

 var metricServer = new MetricServer(options);
 metricServer.Start();

 var counter = Metrics.DefaultFactory.CreateCounter("test_count", "helptext");
 counter.Inc();

 metricServer.Stop();
}

Worker with DI Prometheus.Client.DependencyInjection:

public static async Task Main(string[] args)
{
 var host = Host.CreateDefaultBuilder(args)
 .ConfigureServices((_, services) =>
 {
 services.AddMetricFactory();
 services.AddSingleton<IMetricServer>(sp => new MetricServer(
 new MetricServerOptions
 {
 CollectorRegistryInstance = sp.GetRequiredService<ICollectorRegistry>(),
 UseDefaultCollectors = true
 }));
 services.AddHostedService<Worker>();
 }).Build();

 var metricServer = host.Services.GetRequiredService<IMetricServer>();

 try
 {
 metricServer.Start();
 await host.RunAsync();
 }
 catch (Exception ex)
 {
 Console.WriteLine("Host Terminated Unexpectedly");
 }
 finally
 {
 metricServer.Stop();
 }
}

License

All contents of this package are licensed under the MIT license.

Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Prometheus.Client.MetricServer:

Package Downloads
ShayganTadbir.Framework.Core

Package description

sampleseqproject

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.0.0 6,633 5/24/2025
6.0.0 24,801 9/23/2023
5.0.0 47,480 9/3/2022
4.4.0 37,325 4/6/2022
4.3.1 24,167 6/9/2021
4.3.0 1,210 6/3/2021
4.2.0 1,415 5/23/2021
4.1.0 6,694 1/29/2021
4.0.0 12,774 8/22/2020
3.1.0 16,037 1/21/2020
3.0.1 13,489 6/4/2019
3.0.0 1,808 5/14/2019
3.0.0-rc1 1,200 4/9/2019
2.1.1 116,842 3/24/2019
2.1.0 9,372 1/16/2019
2.0.2 27,632 10/30/2018
2.0.1 1,634 10/19/2018
1.3.2 4,965 8/25/2018
1.3.1 2,991 4/23/2018
Loading failed