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",
                "TagsKeys",
                "TagsValues",
                { "name": "DurationNano", "type": "Long" },
                { "name": "Kind", "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"
        }
      }
    }
