Comments (3)
@dekenless the metrics library should add a very very small overhead to code running in production and because of this the library is designed to be always running or be completely disabled at startup.
You can completely disable the metrics library by adding a line to the config file. The main goal of this setting is to allow users to measure the impact and the overhead of the metrics library.
Adding support for turning the library on and off at runtime (not just at startup) is currently very hard to do. The reason is that since the application has been running, user objects will have references to metric objects (timers, counters etc) possibly in static readonly fields and these references would point to real metrics objects, and not to the NoOp versions that are used when metrics are disabled. Adding another layer of indirection to handle this, would impact the normal flow and intended usage of the library and it is not something i'm willing to do without a very good reason.
In conclusion, my suggestion would be to leave the metrics enabled in production - as they will always provide valuable information. To measure the impact of having the metrics enabled you can use the config setting to disable/enable them.
If the impact is noticeable, I would appreciate it if you could post more details. I'm running metrics in prod in a few projects and never noticed the impact, not even when measurements are taken on critical-path.
from metrics.net.
OK, I will handle it on my end as this is a must for my implementation as it is quite possible to have ~500 metrics (timers and counters). We need to insure that in a production environment the act of reporting on things does not inadvertently affect performance and if it does we need to be able to disable it without bringing down the service.
How about at least being able to stop the MetricsHttpListener at runtime?
from metrics.net.
What about something like what twitter server supports:
/admin/metrics
Watch specific stats and extract them via http queries.
curl "localhost:8090/admin/metrics?m=clnt/crocodile/requests&m=clnt/crocodile/failures"
[
{
"name" : "clnt/crocodile/requests",
"delta" : 643.0,
"value" : 517342.0
},
{
"name" : "clnt/crocodile/failures",
"delta" : 90.0,
"value" : 77430.0
}
]
from metrics.net.
Related Issues (20)
- Strategy for Meter & ActionScheduler when schedules cannot be served at requested intervals HOT 1
- Unable to send metrics to Graphite using PickleGraphiteSender (SocketException, ErrorCode 10053)
- Mistake - Please delete
- Nancy Metrics Adapter - Error 503
- Are you supporting Metrics.net? HOT 32
- can`t release memory after completelyDisableMetrics
- .WithReporting(x=>x.WithElasticSearch() Index naming
- Support for AWS CloudWatch
- Visualisation doesn't work when Health and JSON endpoints are moved. HOT 3
- Monitoring windows service using Metrics.Net HOT 1
- Prometheus metrics should hardcode exceptional double values (NaN, Inf, -Inf)
- Is it possible to select a counter that resets instead of the default cumulative counter? HOT 3
- Break down the project
- .NET Core HOT 9
- Disabling Authentication For Metrics Endpoints
- Type initializer exception in Metrics.MetricsErrorHandler (NRE in cctor) when starting Metrics.NET in my service HOT 3
- [.net40] Some tests hangs because of httpListener is waiting for request
- PerformanceCounters wrong when multiple instances of process running
- It's possible to intergrate Metrics.NET with ASP.NET MVC or ASP.NET WebForm ? HOT 3
- Metrics.net with elasticsearch and grafana (name [Percentile 99.9%] cannot contain '.')
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metrics.net.