Giter Site home page Giter Site logo

docs.v2.hugo's Introduction

App Metrics App Metrics

Official Site License Donate

What is App Metrics?

App Metrics is an open-source and cross-platform .NET library used to record metrics within an application. App Metrics can run on .NET Core or on the full .NET framework. App Metrics abstracts away the underlaying repository of your Metrics for example InfluxDB, Graphite, Prometheus etc, by sampling and aggregating in memory and providing extensibility points to flush metrics to a repository at a specified interval.

App Metrics provides various metric types to measure things such as the rate of requests, counting the number of user logins over time, measure the time taken to execute a database query, measure the amount of free memory and so on. Metrics types supported are Gauges, Counters, Meters, Histograms and Timers and Application Performance Indexes Apdex.

App.Metrics includes an Exponentially Forward Decaying, Sliding Window and Algorithm R reservoir implementations. For more details on reservoir sampling see the docs.

Documentation

Latest Builds, Packages & Repo Stats

Branch Azure Devops
dev Azure Devops
main AppVeyor

Visualization

Dashboards can be imported from Grafana

Grafana Web Monitoring

Grafana/InfluxDB Generic Web Dashboard Demo

Grafana OAuth2 Client Web Monitoring

Grafana/InfluxDB Generic OAuth2 Web Dashboard Demo

How to build

Azure Devops builds are triggered on commits and PRs to the dev branch

  • Install the latest .NET Core 2.x SDK
  • Run build.ps1 or build.sh in the root of the repository

How to run benchmarks

App.Metrics includes benchmarking using BenchmarkDotNet.

Two benchmark projects exist targeting App.Metrics.Core and App.Metrics.Concurrency

	cd .\src\Core\benchmarks\App.Metrics.Benchmarks.Runner
	dotnet run -c "Release" --framework netcoreapp3.1

	cd .\src\Concurrency\benchmarks\App.Metrics.Concurrency.Benchmarks.Runner
	dotnet run -c "Release" --framework netcoreapp3.1

You'll then be prompted to choose a benchmark to run which will output a markdown file with the result in directory.

You can find the benchmark results here and here.

Contributing

See the contribution guidlines for details.

Acknowledgements

Thanks for providing free open source licensing

License

This library is release under Apache 2.0 License ( see LICENSE ) Copyright (c) 2016 Allan Hardy

See LICENSE


App Metrics is based on the Metrics.NET library, and at the moment uses the same reservoir sampling code from the original library which is a port of the Java Dropwizard Metrics library.

Metrics.NET Licensed under these terms: "Metrics.NET is release under Apache 2.0 License Copyright (c) 2014 Iulian Margarintescu" see LICENSE

Dropwizard Metrics Licensed under these terms*: "Copyright (c) 2010-2013 Coda Hale, Yammer.com Published under Apache Software License 2.0, see LICENSE"

docs.v2.hugo's People

Contributors

alessar avatar alhardy avatar arkatufus avatar astef avatar capchik avatar caryj avatar chgl avatar craigsaboe avatar cyberhck avatar dkutetsky avatar fodonnel avatar georgetsaplin avatar harrityindustries avatar karolz-ms avatar kdaveid avatar kirillmyp avatar mnelsonwhite avatar nullableint avatar oceanexplorer avatar ovation22 avatar sebferraro avatar sergey-litvinov avatar sergey-z avatar sheng-jie avatar sombre-hombre avatar stanuku avatar tbolon avatar thiagosgarcia avatar zeqk avatar zlotamoneta avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

docs.v2.hugo's Issues

influx-data configuration sample

Hello,
I'm just starting with AppMetrics and InfluxDb followed docs, but stuck on one issue for entire day.

https://www.app-metrics.io/reporting/reporters/influx-data/

I find this configuration example

var filter = new MetricsFilter().WhereType(MetricType.Timer);
var metrics = new MetricsBuilder()
    .Report.ToInfluxDb(
        options => {
            options.InfluxDb.BaseUri = new Uri("http://127.0.0.1:8086");
            options.InfluxDb.Database = "metricsdatabase";

            options.InfluxDb.Consistenency = "consistency";//Should be removed from sample

            options.InfluxDb.UserName = "admin";
            options.InfluxDb.Password = "password";

            options.InfluxDb.RetensionPolicy = "rp";//Should be removed from sample

            options.InfluxDb.CreateDataBaseIfNotExists = true;
            options.HttpPolicy.BackoffPeriod = TimeSpan.FromSeconds(30);
            options.HttpPolicy.FailuresBeforeBackoff = 5;
            options.HttpPolicy.Timeout = TimeSpan.FromSeconds(10);
            options.MetricsOutputFormatter = new MetricsInfluxDbLineProtocolOutputFormatter();
            options.Filter = filter;
            options.FlushInterval = TimeSpan.FromSeconds(20);
        })
    .Build();

I understand that BaseUri, database, username and password are required to report data and need to be changed accordingly, however consistency and retentionPolicy configs seems like defaults and I left them unchanged. This leads into new database being created in InfluxDb, but no data reported, fails silently.
Removed these two lines and everything works fine.

RetensionPolicy and Consistenency options are documented bellow with all other options, I think it would be best to remove these two lines from configuration sample.

Endpoints :: App Metrics Documentation Out of Date

The documentation here is out of date or contains errors with the following code sample:

.ConfigureAppMetricsHostingConfiguration(options =>
{
    options.AllEndpointsPort = 1111;
    options.MetricsEndpoint = "app-metrics";
});
  • When you use AllEndpointsPort, I receive an error stating that App.Metrics doesn't support setting this on dotnetcore31.
  • When you use the MetricsEndpoint, the endpoint must begin with a forward slash ("/"). Without that you receive an error stating that fact.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.