{
  "leansignal_demand_export": "1.0",
  "exported_at": "2026-07-17T00:00:00Z",
  "source_tenant": "leansignal-catalog",
  "catalog": {
    "slug": "dotnet-otel-demand-standard",
    "integration": "dotnet",
    "variant": "standard",
    "title": ".NET — Standard",
    "category": "SDK",
    "dashboards": 1,
    "panels": 7,
    "alerts": 5,
    "docs_url": "https://docs.leansignal.io/integrations/dotnet/"
  },
  "demand": {
    "ref": "demand",
    "name": ".NET — Standard (OpenTelemetry)",
    "description": "A rounded runtime view: adds working-set memory, GC activity, pause time, and thread-pool health, with warning/critical alerting. The recommended default for ASP.NET Core services.",
    "dashboards": [
      {
        "ref": "dash-dotnet",
        "name": ".NET — Standard",
        "description": ".NET CLR runtime health (GC, JIT, thread pool, memory, exceptions) plus ASP.NET Core HTTP server and HttpClient request metrics (standard variant).",
        "data": {
          "display": {
            "name": ".NET — Standard"
          },
          "panels": {
            "http_request_rate": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "HTTP request rate",
                  "description": "Inbound request throughput per instance."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "requests/sec"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "sum by (instance) (rate(http_server_request_duration_seconds_count{instance=~\"$instance\"}[5m]))",
                          "seriesNameFormat": "{{instance}}"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "http_error_rate": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "HTTP 5xx error rate",
                  "description": "Share of requests answered 5xx."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "percent-decimal"
                      },
                      "min": 0,
                      "max": 1
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "sum by (instance) (rate(http_server_request_duration_seconds_count{instance=~\"$instance\",http_response_status_code=~\"5..\"}[5m])) / sum by (instance) (rate(http_server_request_duration_seconds_count{instance=~\"$instance\"}[5m]))",
                          "seriesNameFormat": "{{instance}}"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "http_latency_p95": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "HTTP request duration p95",
                  "description": "95th-percentile request latency per instance."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "seconds"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "histogram_quantile(0.95, sum by (le, instance) (rate(http_server_request_duration_seconds_bucket{instance=~\"$instance\"}[5m])))",
                          "seriesNameFormat": "{{instance}}"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "process_memory_working_set": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Working set memory",
                  "description": "Physical memory of the process as the OS sees it."
                },
                "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": "sum by (instance) (dotnet_process_memory_working_set_bytes{instance=~\"$instance\"})",
                          "seriesNameFormat": "{{instance}}"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "gc_collection_rate": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "GC collections by generation",
                  "description": "Collection frequency per generation — frequent gen2 means memory pressure."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "ops/sec"
                      },
                      "min": 0
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "sum by (instance, dotnet_gc_heap_generation) (rate(dotnet_gc_collections_total{instance=~\"$instance\"}[5m]))",
                          "seriesNameFormat": "{{instance}} · {{dotnet_gc_heap_generation}}"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "gc_pause_fraction": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Time paused in GC",
                  "description": "Share of wall time the runtime is paused for GC."
                },
                "plugin": {
                  "kind": "TimeSeriesChart",
                  "spec": {
                    "legend": {
                      "position": "bottom",
                      "mode": "table",
                      "values": [
                        "last-number",
                        "mean",
                        "max"
                      ]
                    },
                    "yAxis": {
                      "format": {
                        "unit": "percent-decimal"
                      },
                      "min": 0,
                      "max": 1
                    }
                  }
                },
                "queries": [
                  {
                    "kind": "TimeSeriesQuery",
                    "spec": {
                      "plugin": {
                        "kind": "PrometheusTimeSeriesQuery",
                        "spec": {
                          "query": "sum by (instance) (rate(dotnet_gc_pause_time_seconds_total{instance=~\"$instance\"}[5m]))",
                          "seriesNameFormat": "{{instance}}"
                        }
                      }
                    }
                  }
                ]
              }
            },
            "threadpool_thread_count": {
              "kind": "Panel",
              "spec": {
                "display": {
                  "name": "Thread pool threads",
                  "description": "Worker threads in the pool — sustained growth means the pool is injecting threads to cover blocking work."
                },
                "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 by (instance) (dotnet_thread_pool_thread_count{instance=~\"$instance\"})",
                          "seriesNameFormat": "{{instance}}"
                        }
                      }
                    }
                  }
                ]
              }
            }
          },
          "layouts": [
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "HTTP",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/http_request_rate"
                    }
                  },
                  {
                    "x": 12,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/http_error_rate"
                    }
                  },
                  {
                    "x": 0,
                    "y": 8,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/http_latency_p95"
                    }
                  }
                ]
              }
            },
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "Memory",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/process_memory_working_set"
                    }
                  }
                ]
              }
            },
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "GC",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/gc_collection_rate"
                    }
                  },
                  {
                    "x": 12,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/gc_pause_fraction"
                    }
                  }
                ]
              }
            },
            {
              "kind": "Grid",
              "spec": {
                "display": {
                  "title": "Threads",
                  "collapse": {
                    "open": true
                  }
                },
                "items": [
                  {
                    "x": 0,
                    "y": 0,
                    "width": 12,
                    "height": 8,
                    "content": {
                      "$ref": "#/spec/panels/threadpool_thread_count"
                    }
                  }
                ]
              }
            }
          ],
          "variables": [
            {
              "kind": "ListVariable",
              "spec": {
                "name": "instance",
                "display": {
                  "name": "Instance"
                },
                "allowAllValue": true,
                "allowMultiple": true,
                "customAllValue": ".*",
                "defaultValue": ".*",
                "plugin": {
                  "kind": "PrometheusLabelValuesVariable",
                  "spec": {
                    "labelName": "instance"
                  }
                }
              }
            }
          ],
          "duration": "1h",
          "refreshInterval": "30s",
          "datasources": {}
        }
      }
    ],
    "alert_rules": [
      {
        "ref": "alert-http-5xx-error-rate",
        "name": "High HTTP 5xx error rate",
        "description": null,
        "query": "sum by (instance) (rate(http_server_request_duration_seconds_count{http_response_status_code=~\"5..\"}[5m])) / sum by (instance) (rate(http_server_request_duration_seconds_count[5m]))",
        "condition_op": "gt",
        "threshold": 0.05,
        "interval": "1m",
        "for": "5m",
        "severity": "critical",
        "message": "{{labels.instance}} is serving {{value | percent:1}} 5xx responses.",
        "notify_on_resolve": true,
        "paused": false,
        "channels": []
      },
      {
        "ref": "alert-http-latency-p95-high",
        "name": "High HTTP p95 latency",
        "description": null,
        "query": "histogram_quantile(0.95, sum by (le, instance) (rate(http_server_request_duration_seconds_bucket[5m])))",
        "condition_op": "gt",
        "threshold": 1,
        "interval": "1m",
        "for": "5m",
        "severity": "warning",
        "message": "{{labels.instance}} p95 request latency is {{value}}s.",
        "notify_on_resolve": true,
        "paused": false,
        "channels": []
      },
      {
        "ref": "alert-threadpool-queue-backlog",
        "name": "Thread pool queue backlog",
        "description": null,
        "query": "sum by (instance) (avg_over_time(dotnet_thread_pool_queue_length[10m]))",
        "condition_op": "gt",
        "threshold": 100,
        "interval": "1m",
        "for": "10m",
        "severity": "warning",
        "message": "{{labels.instance}} has {{value}} work items queued on the thread pool — thread-pool starvation.",
        "notify_on_resolve": true,
        "paused": false,
        "channels": []
      },
      {
        "ref": "alert-gc-pause-fraction-high",
        "name": "Excessive time in GC",
        "description": null,
        "query": "sum by (instance) (rate(dotnet_gc_pause_time_seconds_total[5m]))",
        "condition_op": "gt",
        "threshold": 0.1,
        "interval": "1m",
        "for": "10m",
        "severity": "warning",
        "message": "{{labels.instance}} spends {{value | percent:1}} of wall time paused in GC.",
        "notify_on_resolve": true,
        "paused": false,
        "channels": []
      },
      {
        "ref": "alert-exception-rate-high",
        "name": "Elevated exception rate",
        "description": null,
        "query": "sum by (instance) (rate(dotnet_exceptions_total[5m]))",
        "condition_op": "gt",
        "threshold": 10,
        "interval": "1m",
        "for": "10m",
        "severity": "warning",
        "message": "{{labels.instance}} is throwing {{value}} exceptions/s sustained.",
        "notify_on_resolve": true,
        "paused": false,
        "channels": []
      }
    ]
  }
}
