-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow disabling of sum, count, and max timer metrics being sent to DataDog. #2180
Comments
Without making a custom registry, or perhaps a custom That said, it is probably worth considering if only reporting the average is useful. The average can't be aggregated across tags (whereas the sum, count, and max can) and generally the average is not a representative indicator for latency anyways (because latency distributions are in practice never normal bell-curve distributions). I can understand the desire to save cost, but you want to make sure that you're getting the expected value out of what metrics you're shipping also. |
@shakuzen Thanks for the quick response and answering my question! The biggest concern we have right now is trying to get our DataDog costs down and removing 3 out of 4 metrics would do that. I was just hoping there was an easy way to disable those non-needed metrics. Perhaps I will explore implementing a custom meter to see if that works for us. |
@brettcooper did you ever solve this with a custom implementation or anything? We are having a similar issue where we are paying an awful lot of money in Cloudwatch fees for metrics we aren't ever looking at. |
@Cowbacca This is still an issue for us as well and I haven't had time to try a custom implementation yet. If you find a fix for this, please share. |
@shakuzen Perhaps if there was a config setting in DatadogConfig to disable certain unwanted timer metrics or some other way to override defaults from DataDogMeterRegistry? @Cowbacca I decided to give TimeGauge a try as it only reports 1 metric value (meterRegistry.more().timeGauge()). I can do a average rollup within DataDog which gives me the data I need. |
This should be a Micrometer feature because has a huge impact on Datadog bills (and other saas)... |
@Cowbacca @jbaris I did end up fixing this by implementing a custom FilteringHttpClient to filter out metrics that you don't want sent to DataDog.
application.yml:
|
@brettcooper thank you so much! |
Even if this workaround works, I think this feature should be provided on micrometer out-of-box. Isn't ? |
There were some interest on this on Slack so I reopened this but from my perspective removing the average should resolve this (2.x). |
It's a very important functionality for our company, as it can save hundreds of thousands dollar per year |
Did you check out Metrics Without Limits. https://docs.datadoghq.com/metrics/metrics-without-limits/ With that you can configure in DD which metrics and time and space aggregations you are interested in, and only pay for that. |
@cptkng23 We are using it, but we are still paying for the ingestion, it critical as we have millions of metrics |
Hi @genadit |
@cptkng23 For the small companies, it's a good workaround, but in our case, we are not going to use HTTP implementation of sending metrics (just statsD) , and we'll wait for the Micrometer solution. |
If you are measuring execution times, max and avg are important. So, sum and count should be removed. Anyway, should be configurable to support different needs. |
I was following the approach @brettcooper suggested to not send I have modified the code like below
But I am observing that for some timer metrics, I am observing the below
Basically, Can someone let me know what is going wrong? spring-boot-version - 3.0.12 |
In order to try to save money on our DataDog bill, I am trying to disable as many custom metrics as possible. We have a timer named "sync_speed" and the only metric we need sent to DataDog is "avg". Currently, "sync_speed.avg", "sync_speed.sum", "sync_speed.count" and "sync_speed.max" are all being sent to DataDog and we are being charged for each metric separately.
Is it currently possible to disable all other metrics besides "sync_speed.avg" with micrometer-registry-datadog? I have tried using Spring boot properties to disable in my application.yml file and even tried a custom MeterFilter. Neither option seems to work. If this option is currently not available, it would be convenient to have a config value or something that could enable / disable certain timer metrics that aren't needed. Thanks for your help!
The text was updated successfully, but these errors were encountered: