All Projects → shopyourway → Metrics

shopyourway / Metrics

Licence: mit
A framework for reporting data point information (measurements and time-series) for .NET applications, uncompromisingly simple.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Metrics

Vsphere2metrics
VMware vSphere Performance Metrics Integration with Graphite & InfluxDB
Stars: ✭ 28 (+7.69%)
Mutual labels:  graphite, performance-metrics
Stackimpact Java
StackImpact Java Profiler - Production-Grade Performance Profiler: CPU, locks, runtime metrics, and more
Stars: ✭ 7 (-73.08%)
Mutual labels:  performance-metrics
Wizzy
Manage & automate Grafana with easy wizzy
Stars: ✭ 461 (+1673.08%)
Mutual labels:  graphite
Metrictank
metrics2.0 based, multi-tenant timeseries store for Graphite and friends.
Stars: ✭ 574 (+2107.69%)
Mutual labels:  graphite
Goappmonitor
Golang application performance data monitoring.
Stars: ✭ 478 (+1738.46%)
Mutual labels:  performance-metrics
Stackimpact Python
DEPRECATED StackImpact Python Profiler - Production-Grade Performance Profiler: CPU, memory allocations, blocking calls, exceptions, metrics, and more
Stars: ✭ 671 (+2480.77%)
Mutual labels:  performance-metrics
Carbon Relay Ng
Fast carbon relay+aggregator with admin interfaces for making changes online - production ready
Stars: ✭ 429 (+1550%)
Mutual labels:  graphite
Logmonitor
Monitoring log files on windows systems.
Stars: ✭ 23 (-11.54%)
Mutual labels:  graphite
Monitoring Configuration
Shinken based monitoring configuration
Stars: ✭ 5 (-80.77%)
Mutual labels:  graphite
Cabot
Self-hosted, easily-deployable monitoring and alerts service - like a lightweight PagerDuty
Stars: ✭ 5,209 (+19934.62%)
Mutual labels:  graphite
Lighthouse
Automated auditing, performance metrics, and best practices for the web.
Stars: ✭ 23,903 (+91834.62%)
Mutual labels:  performance-metrics
Tgres
Time Series in Go and PostgreSQL
Stars: ✭ 481 (+1750%)
Mutual labels:  graphite
Go Carbon
Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
Stars: ✭ 713 (+2642.31%)
Mutual labels:  graphite
Apm Agent Nodejs
Elastic APM Node.js Agent
Stars: ✭ 467 (+1696.15%)
Mutual labels:  performance-metrics
Graylog Plugin Metrics
Graylog output plugin for Graphite and Ganglia
Stars: ✭ 16 (-38.46%)
Mutual labels:  graphite
Sitespeed.io
Sitespeed.io is an open source tool that helps you monitor, analyze and optimize your website speed and performance, based on performance best practices advices from the coach and collecting browser metrics using the Navigation Timing API, User Timings and Visual Metrics (FirstVisualChange, SpeedIndex & LastVisualChange).
Stars: ✭ 4,255 (+16265.38%)
Mutual labels:  performance-metrics
Inspectit
inspectIT is the leading Open Source APM (Application Performance Management) tool for analyzing your Java (EE) applications.
Stars: ✭ 513 (+1873.08%)
Mutual labels:  performance-metrics
Graphite Web
A highly scalable real-time graphing system
Stars: ✭ 5,384 (+20607.69%)
Mutual labels:  graphite
Browser Perf
Performance Metrics for Web Browsers
Stars: ✭ 930 (+3476.92%)
Mutual labels:  performance-metrics
Docker Go Graphite
Docker image for go-carbon + carbonapi + grafana
Stars: ✭ 23 (-11.54%)
Mutual labels:  graphite

Metrics

Metrics is a framework for reporting data point information (measurements and time-series) for .NET applications, uncompromisingly simple.

Metrics can also be used as a .NET client for Graphite.

Highlights

  • We currently support the following targets out of the box:
    • Graphite
    • Console
    • In-momeory (for tests)
  • .Net Core support - targeting .Net Standard 1.6

Getting started

Installation

NuGet

Start Reporting Metrics

To start reporting metrics on an application, just call MetricsStarter.Initialize with the required reporters, on the application startup:

MetricsStarter.Initialize(
    new GraphiteMetricsReporterFactory(_graphiteConfiguration),
    new ConsoleMetricsReporterFactory(0)
);

Next, to report metrics data, you need to use the static Metrics object, with the required operation. For example:

//first, declare a space:
private MetricsSpace _metrics = Metrics.Space("Custom").Space("SubSpace").Space("SubSubSpace");

public void SomeMethod()
{
	//reporting an increment:
	_metrics.Meter("MeterName").Increment(1);


	//reporting execution time:
	using (_meter("MeterName").TimeScope())
	{
		// operations to measure...
	}

	//reporting value distribution:
	_metrics.Meter("MeterName").ValueDistribution(value);
}

Using Graphite

One of Metric's main targets is Graphite. Graphite is a monitoring tool that applications can report numeric data-points to, and afterwards visualize this data. (more info abour Graphite can be found on Graphite's webstite: https://graphiteapp.org/.

To use Graphite, you will need to implement IGraphiteConfiguration on your application, and pass it to the GraphiteMetricsReporterFactory as shown above.

public class GraphiteConfiguration : IGraphiteConfiguration
{
	public string IpAddress { get; }

	public GraphiteConfiguration(string ipAddress)
	{
		IpAddress = ipAddress;
	}
}

Reporting Control

You can turn on/off/suspend the metrics reporting while the application is still running.

Just take dependency on IMetricsSwitch and use the actions it provides. Note that IMetricsSwitch controls all metrics reporters.

There's also a switch for controlling graphite only, with the suprising name - IGraphiteSwitch.

Customize

You can customize metrics and take it to a whole new level by creating your own implementation of IMetricsReporterFactory.

Implement the CreateReporter Method, and register it to MetricsStarter.Initialize, along with all other out-of-the-box reporters.

For example, this is basically how our beloved PerfDbg works... it's based on metrics reporting:

public class PerfDbgReporterFactory : IMetricsReporterFactory
{
	public Action<DataPoint> CreateReporter()
	{
		return PerfDbgReporter.Report;
	}
}

Development

How to contribute

We encorage contribution via pull requests on any feature you see fit.

When submitting a pull request make sure to do the following:

  • Check that new and updated code follows OhioBox existing code formatting and naming standard
  • Run all tests to ensure no existing functionality has been affected
  • Write tests to test your changes. All features and fixed bugs must have tests to verify they work. Read GitHub Help for more details about creating pull requests

Running tests

You can simply run the tests in Visual Studio or with NUnit test runner.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].