0

I want to have a top list for data dog that that counts numbers of times different statuses in my application were given.

I have a simple method that preparing a result for an api call im exposing, and a Result have Status, this is how the method looks like:

  def prepareStatus(shouldGiveStatus: Boolean, status: Status): Option[Result] = {
    if (shouldGiveStatus) {
        // here I want to add counter for statuses
         Result(status)
    } else {
        None
    } 
  }

im using Kamon and scala, I think I need to do it with histogram but I would love to get some direction of how to implement the metric in my code...thanks!!

Ninja
  • 85
  • 7
  • Hi there--- I don't believe you'll want to use a histogram. You'll most likely want to use a gauge or a count (if you're submitting via dogstatsd) depending on what you're end goal is. Can you provide a bit more context/info? It's not possible to submit a histogram via the API. I'd use this endpoint https://docs.datadoghq.com/api/#metrics-post using the Scala client library you're referencing. – tqr_aupa_atleti Nov 10 '17 at 22:59
  • @tqr_aupa_atleti hi man, thanks for the response. I want to have a top list in datadog that would be called "Statuses" and it will look like: Status.Ready 3 (times) Status.NotReady 1 (times) Status.Whatever 5 (times) etc – Ninja Nov 10 '17 at 23:07

0 Answers0