apiVersion: v1
kind: ConfigMap
metadata:
  name: supervisor-config
data:
  supervisor-spec.json: |
    {
        "type": "kafka",
        "dataSchema": {
          "dataSource": "flattened_spans",
          "parser": {
            "type": "string",
            "parseSpec": {
              "format": "json",
              "timestampSpec": {
                "column": "StartTimeUnixNano",
                "format": "nano"
              },
              "dimensionsSpec": {
                "dimensions": [
                  "TraceId",
                  "SpanId",
                  "ParentSpanId",
                  "Name",
                  "ServiceName",
                  "References",
                  "Tags",
                  "ExternalHttpMethod",
                  "ExternalHttpUrl",
                  "Component",
                  "DBSystem",
                  "DBName",
                  "DBOperation",
                  "PeerService",
                  { 
                      "type": "string",
                      "name": "TagsKeys", 
                      "multiValueHandling": "ARRAY" 
                  },
                  { 
                      "type": "string",
                      "name": "TagsValues", 
                      "multiValueHandling": "ARRAY" 
                  },
                  { "name": "DurationNano", "type": "Long" },
                  { "name": "Kind", "type": "int" },
                  { "name": "StatusCode", "type": "int" }
                ]
              }
            }
          },
          "metricsSpec" : [
              { "type": "quantilesDoublesSketch", "name": "QuantileDuration", "fieldName": "DurationNano" }
          ],
          "granularitySpec": {
            "type": "uniform",
            "segmentGranularity": "DAY",
            "queryGranularity": "NONE",
            "rollup": false
          }
        },
        "tuningConfig": {
          "type": "kafka",
          "reportParseExceptions": true
        },
        "ioConfig": {
          "topic": "flattened_spans",
          "replicas": 1,
          "taskDuration": "PT20M",
          "completionTimeout": "PT30M",
          "consumerProperties": {
            "bootstrap.servers": "signoz-kafka:9092"
          }
        }
      }

