tremor-runtime icon indicating copy to clipboard operation
tremor-runtime copied to clipboard

Add a DataDog Connector for sending metrics via Rest API

Open anuprout opened this issue 4 years ago • 4 comments
trafficstars

Describe the problem you are trying to solve Support for writing custom metrics to DataDog using REST API.

Describe the solution you'd like Either a separate offramp or a batch operator to send data in batches using the REST offramp.

anuprout avatar Sep 14 '21 12:09 anuprout

Important info here:

All requests to Datadog’s API must be authenticated. Requests that write data require reporting access and require an API key. Requests that read data require full access and also require an application key.

https://docs.datadoghq.com/api/latest/authentication/

A datadog connector needs to have an api key and an application key configured. As well as a datadog_host config. We could pull this off by adding an auth config on the rest offramp/connector specialized for datadog.

The required format for metrics is:

{
  "series": [
    {
      "host": "test.example.com",
      "interval": 20,
      "metric": "system.load.1",
      "points": [
        [
          1575317847,
          0.5
        ]
      ],
      "tags": [
        "environment:test"
      ],
      "type": "rate"
    }
  ]
}

So each event needs to be wrapped in a json object, which we could either support via the batch operator or a group by select statement.

But i think it is more convenient for users to have a ready-made datadog-metrics connector to just send stuff to.

mfelsche avatar Sep 14 '21 12:09 mfelsche

we can avoid a datadoc conector by setting this in a script

Licenser avatar Sep 15 '21 08:09 Licenser

i know, this would solve the immediate pain of not being able to send stuff to datadog. So, in this sense, it is already possible right now. But having users go through all those hoops to send stuff to datadog is really inconvenient.

For the sake of usability, although it would duplicate code we have around here and there, i would suggest to create a datadog connector, instead of providing it the ikea way (bits and pieces to put together on your own).

mfelsche avatar Sep 15 '21 09:09 mfelsche

I would disagree, I think packaging this up with modular queries instead of extra connectors is in the long term a better usability. having hundreds of different connectors, is not as useful as having a few well polished ones and pluggable pieces in between

Licenser avatar Sep 15 '21 09:09 Licenser