I've created a custom Datadog metric in a Springboot Java App, and turned on the management end-points.
I am incrementing a MeterRegistry Counter with a double value (relating to the monetary value of an order) When I use the /management/metrics end-point, I can see the correct value being stored.
However, when I create a widget in my Datadog dashboard, it is only displaying the pre-decimal point value of the data. e.g the order value is 61.67 and in Datadog it is displaying 61, so it's not even doing any rounding !
Is there any way to display the raw value of the counter in a Datadog Dashboard widget?
Thanks in advance
https://app.datadoghq.com/metric/summary?metric=<my-metric>
Not sure if a counter type can have decimal values, maybe a gauge would be more appropriate.{
"viz": "query_value",
"requests": [
{
"q": "avg:nginx.logs.request.count{*}.as_count()",
"type": null,
"style": {
"palette": "dog_classic",
"type": "solid",
"width": "normal"
},
"aggregator": "last",
"conditional_formats": [
{
"comparator": ">",
"palette": "white_on_red",
"value": null
},
{
"comparator": ">=",
"palette": "white_on_yellow",
"value": null
},
{
"comparator": "<",
"palette": "white_on_green",
"value": null
}
]
}
],
"autoscale": true,
"precision": "3"
}
Side note: I also use this for Kafka (just as a reference) but it should not be required in your case:
ENTRYPOINT ["java","-javaagent:dd-java-agent.jar","-Ddd.agent.host=localhost","-Ddd.jmxfetch.statsd.host=localhost","-Ddd.trace.global.tags=env:kafka","-Ddd.agent.port=8126","-Ddd.service.name=KafkaProducer","-Ddd.logs.injection=true","-Ddd.trace.analytics.enabled=true","-Ddd.kafka.analytics.enabled=true","-Ddd.servlet.analytics.enabled=true","-Ddd.spring-web.analytics.enabled=true","-jar","target/KafkaConsumer-0.0.1-SNAPSHOT.jar"]