MyGit

Pereingo/statsd-csharp-client

Fork: 67 Star: 111 (更新于 2024-11-04 13:19:17)

license: MIT

Language: C# .

Statsd C# Client

最后发布版本: v3.0.86 ( 2017-04-17 22:19:11)

GitHub网址

Statsd Client - DEPRECATED

This project is deprecated as of March 4, 2019. There's no official maintainer, and better alternatives exist. Security only related updates will be considered going forward. Currently active versions will remain on NuGet.

We suggest migrating to JustEat.StatsD, which has a very similar API to this project, plenty of additional features, and is actively maintained.

Thanks to all the contributors and your many PRs and reported issues over the years, the numerous developers that have forked or been inspired by this client, and everyone that used it successfully in production!

THIS PROJECT IS DEPRECATED

Original readme...


Build status NuGet Version

A .NET Standard compatible C# client to interface with Etsy's excellent statsd server.

Install the client via NuGet with the StatsdClient package.

Usage

At app startup, configure the Metrics class:

Metrics.Configure(new MetricsConfig
{
  StatsdServerName = "hostname",
  Prefix = "myApp.prod"
});

Start measuring all the things!

Metrics.Counter("stat-name");
Metrics.Time(() => myMethod(), "timer-name");
var result = Metrics.Time(() => GetResult(), "timer-name");
var result = await Metrics.Time(async () => await myAsyncMethod(), "timer-name");
Metrics.GaugeAbsoluteValue("gauge-name", 35);
Metrics.GaugeDelta("gauge-name", -5);
Metrics.Set("something-special", "3");

using (Metrics.StartTimer("stat-name"))
{
  // Lots of code here
}

Advanced Features

To enable these, see the MetricsConfig class discussed above.

  • UseTcpProtocol: sends metrics to statsd via TCP. While supported, UDP is recommended in most cases. If you need TCP reliability, a relay service running locally on the server which you'd send UDP to, and it would relay via TCP, is advised.

Contributing

See the Contributing guidelines.

最近版本更新:(数据更新于 2024-09-17 00:35:21)

2017-04-17 22:19:11 v3.0.86

主题(topics):

c-sharp, nuget, statsd, statsd-client

Pereingo/statsd-csharp-client同语言 C#最近更新仓库

2024-11-19 11:38:46 jellyfin/jellyfin

2024-11-15 10:33:01 DigitalRuby/IPBan

2024-11-13 04:41:56 dotnet/runtime

2024-11-07 00:43:03 huiyadanli/RevokeMsgPatcher

2024-11-06 13:04:33 Pik-4/HsMod

2024-11-05 02:46:31 microsoft/PowerToys