Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 12, 2020. It is now read-only.

Statsd C# Client

License

NotificationsYou must be signed in to change notification settings

Pereingo/statsd-csharp-client

Repository files navigation

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 toJustEat.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 statusNuGet Version

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

Install the client via NuGet with theStatsdClient package.

Usage

At app startup, configure theMetrics class:

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

Start measuring all the things!

Metrics.Counter("stat-name");Metrics.Time(()=>myMethod(),"timer-name");varresult=Metrics.Time(()=>GetResult(),"timer-name");varresult=awaitMetrics.Time(async()=>awaitmyAsyncMethod(),"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 theMetricsConfig 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 theContributing guidelines.

About

Statsd C# Client

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors16


[8]ページ先頭

©2009-2025 Movatter.jp