Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a graph of the average value of an log attribute using Datadog?

My mobile app is posting the following log messages to Datadog:

logger.log(
    priority = Log.INFO,
    message = "Jank Report",
    attributes = mapOf(
        "percent_jank" to percentJank, // floating-point number
        "duration_ms" to durationMs    // integer in ms
    )
)

I can see the log entries in Log Explorer. I want to create graphs on my dashboard that display the average percent_jank and duration_ms. I'd also like to create distribution graphs of those values but I have no idea how to reference them on my dashboard.

Can someone please explain or point me at the right docs, or at least tell me if it's even possible?

like image 365
Barry Fruitman Avatar asked Jan 22 '26 22:01

Barry Fruitman


1 Answers

You can do this by changing the 'measure' from all logs to a specific attribute: all logs measure

DataDog will then allow you to select an aggregation like an average on the attribute: attribute measure

like image 93
Sal Avatar answered Jan 26 '26 06:01

Sal