Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 625 Bytes

README.md

File metadata and controls

39 lines (33 loc) · 625 Bytes

Metrics Processor

Serverless Function to consume metrics from a Kafka topic and store them in Loki and MongoDB Time-Series.

Loki Format

{
  "streams": [
    {
      "stream": {
        "labelKey": "labelValue" # can be used for filtering
      },
      "values": [
        [
          "timestamp",
          "value"
          {"optional": "labels"}
        ]
      ]
    }
  ]
}

MongoDB Time-Series Format

{
  "timestamp": "timestamp",
  "metadata": {
    "labelKey": "labelValue"
  }

  ...keyvalues
}

Weird Hacks

  • MongoDB is incredibly buggy so we are using certifi for SSL resolution.