{
  "leansignal_demand_export": "1.0",
  "exported_at": "2026-07-17T00:00:00Z",
  "source_tenant": "leansignal-catalog",
  "catalog": {
    "slug": "leansignal-leanapi-otel-demand-essential",
    "integration": "leansignal-leanapi",
    "variant": "essential",
    "title": "LeanSignal API — Essential",
    "category": "Infrastructure",
    "dashboards": 1,
    "panels": 12,
    "alerts": 0,
    "docs_url": "https://docs.leansignal.io/integrations/leansignal-leanapi/"
  },
  "demand": {
    "ref": "demand",
    "name": "LeanSignal API — Essential (OpenTelemetry)",
    "description": "Per-filter accounting plus the demand headline: how many series each filter collects and stores, the active demand-set size, and connected agents. The smallest footprint that tells you what the platform is demanding and what it costs.",
    "dashboards": [
      {
        "ref": "dash-leansignal-leanapi",
        "name": "LeanSignal API — Essential",
        "description": "The LeanSignal API's own telemetry — per-filter collection/storage accounting, demand-set size and cost, connected agents, and process health (essential variant).",
        "data": {
          "display": {
            "name": "LeanSignal API — Essential"
          },
          "panels": {
            "stored_series": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Stored time series",
                  "description": "Time series currently in the tenant metrics store (live inventory, not a cumulative counter)."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "decimal"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "max(leansignal_leanapi_storage_metrics_series{service_instance_id=~\"$instance\"})",
                          "seriesNameFormat": "series"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "stored_log_bytes": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Stored log volume",
                  "description": "Log volume held by the tenant log store over its retention window (indexed, uncompressed)."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "bytes"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "max(leansignal_leanapi_storage_logs_volume_bytes{service_instance_id=~\"$instance\"})",
                          "seriesNameFormat": "log bytes"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "stored_spans": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Spans ingested",
                  "description": "Spans received by the tenant trace store since it last started (the store keeps no stored-spans gauge, so this resets on its restart)."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "decimal"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "max(leansignal_leanapi_storage_traces_spans{service_instance_id=~\"$instance\"})",
                          "seriesNameFormat": "spans"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "stored_trace_bytes": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Traces stored (bytes)",
                  "description": "Trace data currently stored in the tenant trace store (live backend blocks) — the billing-grade stored-traces figure."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "bytes"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "max(leansignal_leanapi_storage_traces_backend_bytes{service_instance_id=~\"$instance\"})",
                          "seriesNameFormat": "trace bytes"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "ingest_log_bytes": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Log ingest (bytes/sec)",
                  "description": "Log bytes arriving at the tenant log store, as measured by the store itself — the billing-grade logs-ingest rate."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "bytes/sec"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "sum(rate(leansignal_leanapi_storage_logs_ingested_bytes{service_instance_id=~\"$instance\"}[5m]))",
                          "seriesNameFormat": "log bytes/s"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "ingest_trace_bytes": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Trace ingest (bytes/sec)",
                  "description": "Trace bytes arriving at the tenant trace store, as measured by the store itself — the billing-grade traces-ingest rate."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "bytes/sec"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "sum(rate(leansignal_leanapi_storage_traces_ingested_bytes{service_instance_id=~\"$instance\"}[5m]))",
                          "seriesNameFormat": "trace bytes/s"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "synth_up": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Check status",
                  "description": "Latest probe outcome per synthetic check: 1 up, 0 down."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "decimal"
                      },
                      "min": 0,
                      "max": 1
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "min by (check) (leansignal_leanapi_synthetics_check_up{service_instance_id=~\"$instance\"})",
                          "seriesNameFormat": "{{check}}"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "synth_latency": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Check latency",
                  "description": "Latest probe round-trip latency per synthetic check."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "milliseconds"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "max by (check) (leansignal_leanapi_synthetics_check_latency_ms{service_instance_id=~\"$instance\"})",
                          "seriesNameFormat": "{{check}}"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "collected_total": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Collected series (active demand)",
                  "description": "Total series the active filters demand — what the agents forward. Sum of the per-filter collection gauge over active filters."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "decimal"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "sum(leansignal_leanapi_filter_collected_series{service_instance_id=~\"$instance\",status=\"active\"})",
                          "seriesNameFormat": "collected (active)"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "stored_total": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Stored series (dataplane)",
                  "description": "Total series in the tenant store matching any filter — what is/was stored, including data from filters that went inactive but have not been purged yet."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "decimal"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "sum(leansignal_leanapi_filter_stored_series{service_instance_id=~\"$instance\"})",
                          "seriesNameFormat": "stored"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "active_metrics": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Active demand-set size",
                  "description": "Unique metric names in the active demand set (dashboards ∪ active alerts ∪ enabled custom rules)."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "decimal"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "leansignal_leanapi_demand_active_metrics{service_instance_id=~\"$instance\"}",
                          "seriesNameFormat": "active metrics"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "agents_connected": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Connected agents",
                  "description": "Agents with a live control stream to this lean-api."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "decimal"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "leansignal_leanapi_agents_connected{service_instance_id=~\"$instance\"}",
                          "seriesNameFormat": "connected"
                        }
                      }
                    }
                  }
                ]
              }
            }
          },
          "layouts": [
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "Stored data",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/stored_series"
                    }
                  },
                  {
                    "x": 12,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/stored_log_bytes"
                    }
                  },
                  {
                    "x": 0,
                    "y": 8,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/stored_spans"
                    }
                  },
                  {
                    "x": 12,
                    "y": 8,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/stored_trace_bytes"
                    }
                  },
                  {
                    "x": 0,
                    "y": 16,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/ingest_log_bytes"
                    }
                  },
                  {
                    "x": 12,
                    "y": 16,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/ingest_trace_bytes"
                    }
                  }
                ]
              }
            },
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "Synthetics",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/synth_up"
                    }
                  },
                  {
                    "x": 12,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/synth_latency"
                    }
                  }
                ]
              }
            },
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "Filter accounting",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/collected_total"
                    }
                  },
                  {
                    "x": 12,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/stored_total"
                    }
                  }
                ]
              }
            },
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "Demand",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/active_metrics"
                    }
                  }
                ]
              }
            },
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "Platform",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/agents_connected"
                    }
                  }
                ]
              }
            }
          ],
          "variables": [
            {
              "kind": "ListVariable",
              "spec": {
                "name": "instance",
                "display": {
                  "name": "Instance"
                },
                "allowAllValue": true,
                "allowMultiple": true,
                "customAllValue": ".*",
                "defaultValue": ".*",
                "plugin": {
                  "kind": "PrometheusLabelValuesVariable",
                  "spec": {
                    "labelName": "service_instance_id"
                  }
                }
              }
            }
          ],
          "duration": "1h",
          "refreshInterval": "30s",
          "datasources": {}
        }
      }
    ],
    "alert_rules": []
  }
}
