profile
viewpoint
sam boyer sdboyer @grafana Detroit, MI, USA (╯°□°)╯︵ ┻━┻

sdboyer/constext 22

ctx = Cons(ctx1, ctx2)

patcon/acquia-api 13

Ruby implementation of the Acquia Cloud API.

eliza411/scenarioed 3

A gherkin editor for Behat

sdboyer/cligit 2

a php wrapper for invoking git cli commands

sdboyer/2017-talks 1

Slides and links for 2017 talks

sdboyer/ace 1

Ajax.org Cloud9 Editor

sdboyer/bettermeans 1

Open. Democratic. Project management platform.

sdboyer/blueprint 1

Reverse engineer server configuration

sdboyer/brubeck 1

A coroutine oriented web framework featuring: Mongrel2, Eventlet (or Gevent), ZeroMQ and DictShield

Pull request review commentgrafana/jsonnet-libs

Introduce Go runtime mixin

+{+  "__inputs": [],+  "__requires": [+    {+      "type": "grafana",+      "id": "grafana",+      "name": "Grafana",+      "version": "7.2.0"+    },+    {+      "type": "panel",+      "id": "graph",+      "name": "Graph",+      "version": ""+    },+    {+      "type": "datasource",+      "id": "prometheus",+      "name": "Prometheus",+      "version": "1.0.0"+    }+  ],+  "annotations": {+    "list": [+      {+        "builtIn": 1,+        "datasource": "-- Grafana --",+        "enable": true,+        "hide": true,+        "iconColor": "rgba(0, 211, 255, 1)",+        "name": "Annotations & Alerts",+        "type": "dashboard"+      }+    ]+  },+  "description": "Go runtime metrics",+  "editable": true,+  "graphTooltip": 0,+  "id": null,+  "iteration": 1602794777869,+  "links": [],+  "panels": [+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Total bytes of memory reserved by the process.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 16,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: sys",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Total Reserved Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 24,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_stack_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}} stack inuse",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Stack Memory Use",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reservations by the runtime, not for stack or heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 26,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_mspan_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mspan sys",+          "refId": "B"+        },+        {+          "expr": "go_memstats_mcache_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mcache sys",+          "refId": "D"+        },+        {+          "expr": "go_memstats_buck_hash_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: buck hash sys",+          "refId": "E"+        },+        {+          "expr": "go_memstats_gc_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: gc sys",+          "refId": "F"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Other Memory Reservations",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reserved, and actually in use, by the heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 12,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_heap_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap reserved",+          "refId": "B"+        },+        {+          "expr": "go_memstats_heap_inuse_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap in use",+          "refId": "A"+        },+        {+          "expr": "go_memstats_heap_alloc_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap alloc",+          "refId": "C"+        },+        {+          "expr": "go_memstats_heap_idle_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap idle",+          "refId": "D"+        },+        {+          "expr": "go_memstats_heap_released_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap released",+          "refId": "E"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 14,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 1,+      "points": true,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_alloc_bytes_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])",+          "interval": "",+          "legendFormat": "{{instance}}: bytes malloced/s",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Allocation Rate, Bytes",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "Bps",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Rate of heap object allocation.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 20,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_mallocs_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])",+          "interval": "",+          "legendFormat": "{{instance}}: mallocs/sec",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Object Allocation Rate",

Reproduced - yup, it's a result of the Grafana version.

Seems like, if there's an issue to be opened, it's to...actually do something with that field that already exists?

tbqh, i am circumspect about having a 'required version' field. It's ~impossible to automatically determine, which means it can produce both false negatives and false positives.

What can be automatically determined is the version of Grafana that generated the dashboard export. That can be compared against the current version, and offered as a warning if it was generated as a newer version (especially if there are e.g. parse errors).

(Points if anyone recognizes the echoes of old conversations, here :wink:)

sdboyer

comment created time in 2 hours

PullRequestReviewEvent

Pull request review commentgrafana/jsonnet-libs

Introduce Go runtime mixin

+{+  "__inputs": [],+  "__requires": [+    {+      "type": "grafana",+      "id": "grafana",+      "name": "Grafana",+      "version": "7.2.0"+    },+    {+      "type": "panel",+      "id": "graph",+      "name": "Graph",+      "version": ""+    },+    {+      "type": "datasource",+      "id": "prometheus",+      "name": "Prometheus",+      "version": "1.0.0"+    }+  ],+  "annotations": {+    "list": [+      {+        "builtIn": 1,+        "datasource": "-- Grafana --",+        "enable": true,+        "hide": true,+        "iconColor": "rgba(0, 211, 255, 1)",+        "name": "Annotations & Alerts",+        "type": "dashboard"+      }+    ]+  },+  "description": "Go runtime metrics",+  "editable": true,+  "graphTooltip": 0,+  "id": null,+  "iteration": 1602794777869,+  "links": [],+  "panels": [+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Total bytes of memory reserved by the process.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 16,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_sys_bytes{job=\"$job\", instance=~\"$instance\"}",

(Oh, right. i was also trying to avoid the headache of deciding which aggregation was appropriate for the different metrics.)

sdboyer

comment created time in 2 hours

PullRequestReviewEvent

Pull request review commentgrafana/jsonnet-libs

Introduce Go runtime mixin

+{

Certainly seems useful, this dash does feel kinda naked without such a thing. Here, my relative inexperience with Grafana bites me - is there an example of what you have in mind out there that i could work from?

(Aside, seems like client_golang should also probably emit a new gauge with runtime.BuildInfo.Path and runtime.BuildInfo.Module.Version)

sdboyer

comment created time in 2 hours

PullRequestReviewEvent

Pull request review commentgrafana/jsonnet-libs

Introduce Go runtime mixin

+{+  "__inputs": [],+  "__requires": [+    {+      "type": "grafana",+      "id": "grafana",+      "name": "Grafana",+      "version": "7.2.0"+    },+    {+      "type": "panel",+      "id": "graph",+      "name": "Graph",+      "version": ""+    },+    {+      "type": "datasource",+      "id": "prometheus",+      "name": "Prometheus",+      "version": "1.0.0"+    }+  ],+  "annotations": {+    "list": [+      {+        "builtIn": 1,+        "datasource": "-- Grafana --",+        "enable": true,+        "hide": true,+        "iconColor": "rgba(0, 211, 255, 1)",+        "name": "Annotations & Alerts",+        "type": "dashboard"+      }+    ]+  },+  "description": "Go runtime metrics",+  "editable": true,+  "graphTooltip": 0,+  "id": null,+  "iteration": 1602794777869,+  "links": [],+  "panels": [+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Total bytes of memory reserved by the process.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 16,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: sys",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Total Reserved Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 24,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_stack_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}} stack inuse",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Stack Memory Use",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reservations by the runtime, not for stack or heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 26,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_mspan_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mspan sys",+          "refId": "B"+        },+        {+          "expr": "go_memstats_mcache_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mcache sys",+          "refId": "D"+        },+        {+          "expr": "go_memstats_buck_hash_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: buck hash sys",+          "refId": "E"+        },+        {+          "expr": "go_memstats_gc_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: gc sys",+          "refId": "F"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Other Memory Reservations",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reserved, and actually in use, by the heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 12,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_heap_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap reserved",+          "refId": "B"+        },+        {+          "expr": "go_memstats_heap_inuse_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap in use",+          "refId": "A"+        },+        {+          "expr": "go_memstats_heap_alloc_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap alloc",+          "refId": "C"+        },+        {+          "expr": "go_memstats_heap_idle_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap idle",+          "refId": "D"+        },+        {+          "expr": "go_memstats_heap_released_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap released",+          "refId": "E"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 14,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 1,+      "points": true,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_alloc_bytes_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])",+          "interval": "",+          "legendFormat": "{{instance}}: bytes malloced/s",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Allocation Rate, Bytes",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "Bps",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Rate of heap object allocation.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 20,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_mallocs_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])",+          "interval": "",+          "legendFormat": "{{instance}}: mallocs/sec",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Object Allocation Rate",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 24+      },+      "hiddenSeries": false,+      "id": 22,+      "legend": {+        "alignAsTable": false,+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "rightSide": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_mallocs_total{job=\"$job\", instance=~\"$instance\"} - go_memstats_frees_total{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: object count",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Number of Live Objects",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 24+      },+      "hiddenSeries": false,+      "id": 8,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_goroutines{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Goroutines",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "decimals": 0,+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 32+      },+      "hiddenSeries": false,+      "id": 4,+      "legend": {+        "alignAsTable": false,+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_gc_duration_seconds{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: {{quantile}}",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "GC duration quantile",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "ms",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "The number used bytes at which runtime plans to perform the next GC.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 32+      },+      "hiddenSeries": false,+      "id": 27,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_next_gc_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}",+          "refId": "H"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Next GC, Bytes",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "s",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    }+  ],+  "refresh": "5s",+  "schemaVersion": 25,+  "style": "dark",+  "tags": [+    "go",+    "golang"+  ],+  "templating": {+    "list": [+      {+        "current": {+          "selected": false,+          "text": "Prometheus",+          "value": "Prometheus"+        },+        "hide": 0,+        "includeAll": false,+        "label": null,+        "multi": false,+        "name": "datasource",+        "options": [],+        "query": "prometheus",+        "queryValue": "",+        "refresh": 1,+        "regex": "",+        "skipUrlSync": false,+        "type": "datasource"+      },+      {+        "allValue": null,+        "current": {},+        "datasource": "$datasource",+        "definition": "label_values(go_goroutines, job)",+        "hide": 0,+        "includeAll": false,

i omitted that option because it didn't seem especially meaningful to look for information across all Go processes. That is, it was easy to imagine ways in which aggregating across two processes that are unrelated beyond being written in Go could be confusing/misleading, but i couldn't come up with a scenario in which someone would need to look at all Go processes.

Do you have such a scenario in mind?

sdboyer

comment created time in 2 hours

PullRequestReviewEvent

Pull request review commentgrafana/jsonnet-libs

Introduce Go runtime mixin

+{+  "__inputs": [],+  "__requires": [+    {+      "type": "grafana",+      "id": "grafana",+      "name": "Grafana",+      "version": "7.2.0"+    },+    {+      "type": "panel",+      "id": "graph",+      "name": "Graph",+      "version": ""+    },+    {+      "type": "datasource",+      "id": "prometheus",+      "name": "Prometheus",+      "version": "1.0.0"+    }+  ],+  "annotations": {+    "list": [+      {+        "builtIn": 1,+        "datasource": "-- Grafana --",+        "enable": true,+        "hide": true,+        "iconColor": "rgba(0, 211, 255, 1)",+        "name": "Annotations & Alerts",+        "type": "dashboard"+      }+    ]+  },+  "description": "Go runtime metrics",+  "editable": true,+  "graphTooltip": 0,+  "id": null,+  "iteration": 1602794777869,+  "links": [],+  "panels": [+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Total bytes of memory reserved by the process.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 16,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: sys",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Total Reserved Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 24,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_stack_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}} stack inuse",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Stack Memory Use",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reservations by the runtime, not for stack or heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 26,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_mspan_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mspan sys",+          "refId": "B"+        },+        {+          "expr": "go_memstats_mcache_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mcache sys",+          "refId": "D"+        },+        {+          "expr": "go_memstats_buck_hash_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: buck hash sys",+          "refId": "E"+        },+        {+          "expr": "go_memstats_gc_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: gc sys",+          "refId": "F"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Other Memory Reservations",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reserved, and actually in use, by the heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 12,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_heap_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap reserved",+          "refId": "B"+        },+        {+          "expr": "go_memstats_heap_inuse_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap in use",+          "refId": "A"+        },+        {+          "expr": "go_memstats_heap_alloc_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap alloc",+          "refId": "C"+        },+        {+          "expr": "go_memstats_heap_idle_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap idle",+          "refId": "D"+        },+        {+          "expr": "go_memstats_heap_released_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap released",+          "refId": "E"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 14,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 1,+      "points": true,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_alloc_bytes_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])",+          "interval": "",+          "legendFormat": "{{instance}}: bytes malloced/s",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Allocation Rate, Bytes",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "Bps",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Rate of heap object allocation.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 20,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_mallocs_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])",+          "interval": "",+          "legendFormat": "{{instance}}: mallocs/sec",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Object Allocation Rate",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 24+      },+      "hiddenSeries": false,+      "id": 22,+      "legend": {+        "alignAsTable": false,+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "rightSide": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_mallocs_total{job=\"$job\", instance=~\"$instance\"} - go_memstats_frees_total{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: object count",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Number of Live Objects",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 24+      },+      "hiddenSeries": false,+      "id": 8,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_goroutines{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Goroutines",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "decimals": 0,+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 32+      },+      "hiddenSeries": false,+      "id": 4,+      "legend": {+        "alignAsTable": false,+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_gc_duration_seconds{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: {{quantile}}",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "GC duration quantile",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "ms",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "The number used bytes at which runtime plans to perform the next GC.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 32+      },+      "hiddenSeries": false,+      "id": 27,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_next_gc_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}",+          "refId": "H"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Next GC, Bytes",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "s",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    }+  ],+  "refresh": "5s",+  "schemaVersion": 25,+  "style": "dark",+  "tags": [+    "go",+    "golang"+  ],+  "templating": {+    "list": [+      {+        "current": {+          "selected": false,+          "text": "Prometheus",+          "value": "Prometheus"+        },+        "hide": 0,+        "includeAll": false,+        "label": null,+        "multi": false,+        "name": "datasource",+        "options": [],+        "query": "prometheus",+        "queryValue": "",+        "refresh": 1,+        "regex": "",+        "skipUrlSync": false,+        "type": "datasource"+      },+      {+        "allValue": null,+        "current": {},+        "datasource": "$datasource",+        "definition": "label_values(go_goroutines, job)",

:+1: makes sense (i think this actually came straight through from the marketplace dashboard)

sdboyer

comment created time in 2 hours

PullRequestReviewEvent

Pull request review commentgrafana/jsonnet-libs

Introduce Go runtime mixin

+{+  "__inputs": [],+  "__requires": [+    {+      "type": "grafana",+      "id": "grafana",+      "name": "Grafana",+      "version": "7.2.0"+    },+    {+      "type": "panel",+      "id": "graph",+      "name": "Graph",+      "version": ""+    },+    {+      "type": "datasource",+      "id": "prometheus",+      "name": "Prometheus",+      "version": "1.0.0"+    }+  ],+  "annotations": {+    "list": [+      {+        "builtIn": 1,+        "datasource": "-- Grafana --",+        "enable": true,+        "hide": true,+        "iconColor": "rgba(0, 211, 255, 1)",+        "name": "Annotations & Alerts",+        "type": "dashboard"+      }+    ]+  },+  "description": "Go runtime metrics",+  "editable": true,+  "graphTooltip": 0,+  "id": null,+  "iteration": 1602794777869,+  "links": [],+  "panels": [+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Total bytes of memory reserved by the process.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 16,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: sys",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Total Reserved Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 24,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_stack_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}} stack inuse",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Stack Memory Use",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reservations by the runtime, not for stack or heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 26,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_mspan_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mspan sys",+          "refId": "B"+        },+        {+          "expr": "go_memstats_mcache_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mcache sys",+          "refId": "D"+        },+        {+          "expr": "go_memstats_buck_hash_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: buck hash sys",+          "refId": "E"+        },+        {+          "expr": "go_memstats_gc_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: gc sys",+          "refId": "F"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Other Memory Reservations",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reserved, and actually in use, by the heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 12,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_heap_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap reserved",+          "refId": "B"+        },+        {+          "expr": "go_memstats_heap_inuse_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap in use",+          "refId": "A"+        },+        {+          "expr": "go_memstats_heap_alloc_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap alloc",+          "refId": "C"+        },+        {+          "expr": "go_memstats_heap_idle_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap idle",+          "refId": "D"+        },+        {+          "expr": "go_memstats_heap_released_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap released",+          "refId": "E"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 14,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 1,+      "points": true,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_alloc_bytes_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])",+          "interval": "",+          "legendFormat": "{{instance}}: bytes malloced/s",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Allocation Rate, Bytes",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "Bps",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Rate of heap object allocation.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 20,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_mallocs_total{job=\"$job\", instance=~\"$instance\"}[$__rate_interval])",+          "interval": "",+          "legendFormat": "{{instance}}: mallocs/sec",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Object Allocation Rate",

That seems like the most likely culprit? Though there's already a field for the required version, see the top of the JSON:

{
  "__inputs": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.0.4"
    },

i will try to reproduce.

sdboyer

comment created time in 2 hours

PullRequestReviewEvent

Pull request review commentgrafana/jsonnet-libs

Introduce Go runtime mixin

+{+  "__inputs": [],+  "__requires": [+    {+      "type": "grafana",+      "id": "grafana",+      "name": "Grafana",+      "version": "7.2.0"+    },+    {+      "type": "panel",+      "id": "graph",+      "name": "Graph",+      "version": ""+    },+    {+      "type": "datasource",+      "id": "prometheus",+      "name": "Prometheus",+      "version": "1.0.0"+    }+  ],+  "annotations": {+    "list": [+      {+        "builtIn": 1,+        "datasource": "-- Grafana --",+        "enable": true,+        "hide": true,+        "iconColor": "rgba(0, 211, 255, 1)",+        "name": "Annotations & Alerts",+        "type": "dashboard"+      }+    ]+  },+  "description": "Go runtime metrics",+  "editable": true,+  "graphTooltip": 0,+  "id": null,+  "iteration": 1602794777869,+  "links": [],+  "panels": [+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Total bytes of memory reserved by the process.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 16,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_sys_bytes{job=\"$job\", instance=~\"$instance\"}",

From the original PR:

The panels in the dashboard apply no aggregations. I waffled on this a bit, but opted for that approach on the premise that the dashboard is basic enough, and the panels show few enough individual metrics, that the dashboard itself is most likely to be helpful for folks really just getting started. (That, and, they can use the job/instance template variables to drill into a particular instance if they really need to see something that's stuck.) Very open to persuasion on changing this to an aggregated approach.

But in retrospect, i think my reasoning should have led to the opposite conclusion - apply aggregations, on the premise that the user can drill into the individual instance, at which point the aggregation becomes a no-op.

Will change.

sdboyer

comment created time in 2 hours

PullRequestReviewEvent

Pull request review commentgrafana/grizzly

watch-resource action, for live updating dashboards

 func watchCmd(config grizzly.Config) *cli.Command { 	return cmd } +func watchResourceCmd(config grizzly.Config) *cli.Command {+	cmd := &cli.Command{+		Use:   "watch-resource <uid-to-watch> <output-file>",+		Short: "watch for file changes on remove and save locally",+		Args:  cli.ArgsExact(2),+	}+	cmd.Run = func(cmd *cli.Command, args []string) error {+		uid := args[0]

Would doing it this way make it awkward to add more modes later?

For the case where the output is a file, it's fine to just use an arg. But it's easy for me to imagine wanting to pipe it through a separate command, first. Or, a multi-mode where, say, you pass a file which maps UIDs/some wildcard pattern to filenames (or subcommands), and the command then watches them all.

Point is, it's easy to imagine other modes that would be useful. i particularly like the idea that i could just run this in the background and not think about which dashboard i'm editing. Not necessary to plan for that future now...just ruminating

malcolmholmes

comment created time in a day

Pull request review commentgrafana/grizzly

watch-resource action, for live updating dashboards

 func Watch(config Config, watchDir string, parser Parser) error { 	return nil } +// WatchResource waits for remote changes to a resource and saves them to disk+func WatchResource(config Config, UID, filename string) error {+	count := strings.Count(UID, ".")+	var handlerName, resourceID string+	if count == 1 {+		parts := strings.SplitN(UID, ".", 2)+		handlerName = parts[0]+		resourceID = parts[1]+	} else if count == 2 {+		parts := strings.SplitN(UID, ".", 3)+		handlerName = parts[0] + "." + parts[1]+		resourceID = parts[2]++	} else {+		return fmt.Errorf("UID must be <provider>.<uid>: %s", UID)

This seems inconsistent with the two possible branches above - could be two OR three parts. Is this an artifact of some old form of our dashboard UIDs?

malcolmholmes

comment created time in a day

Pull request review commentgrafana/grizzly

watch-resource action, for live updating dashboards

+package grafana++import (+	"encoding/json"+	"fmt"+	"io/ioutil"+	"log"++	"github.com/centrifugal/centrifuge-go"+	"github.com/grafana/grizzly/pkg/grizzly"+)++type eventHandler struct {+	filename string+}++func (h *eventHandler) OnConnect(c *centrifuge.Client, e centrifuge.ConnectEvent) {+	log.Printf("Connected to chat with ID %s", e.ClientID)+	return+}++func (h *eventHandler) OnError(c *centrifuge.Client, e centrifuge.ErrorEvent) {+	log.Printf("Error: %s", e.Message)+	return+}++func (h *eventHandler) OnDisconnect(c *centrifuge.Client, e centrifuge.DisconnectEvent) {+	log.Printf("Disconnected from chat: %s", e.Reason)+	return+}+func (h *eventHandler) OnSubscribeSuccess(sub *centrifuge.Subscription, e centrifuge.SubscribeSuccessEvent) {+	log.Printf("Subscribed on channel %s, resubscribed: %v, recovered: %v", sub.Channel(), e.Resubscribed, e.Recovered)+}++func (h *eventHandler) OnSubscribeError(sub *centrifuge.Subscription, e centrifuge.SubscribeErrorEvent) {+	log.Printf("Subscribed on channel %s failed, error: %s", sub.Channel(), e.Error)+}++func (h *eventHandler) OnUnsubscribe(sub *centrifuge.Subscription, e centrifuge.UnsubscribeEvent) {+	log.Printf("Unsubscribed from channel %s", sub.Channel())+}++func (h *eventHandler) OnMessage(_ *centrifuge.Client, e centrifuge.MessageEvent) {+	log.Printf("Message from server: %s", string(e.Data))+}+func (h *eventHandler) OnServerPublish(c *centrifuge.Client, e centrifuge.ServerPublishEvent) {+	log.Printf("Publication from server-side channel %s: %s", e.Channel, e.Data)+}+func (h *eventHandler) OnServerSubscribe(_ *centrifuge.Client, e centrifuge.ServerSubscribeEvent) {+	log.Printf("Subscribe to server-side channel %s: (resubscribe: %t, recovered: %t)", e.Channel, e.Resubscribed, e.Recovered)+}++func (h *eventHandler) OnServerUnsubscribe(_ *centrifuge.Client, e centrifuge.ServerUnsubscribeEvent) {+	log.Printf("Unsubscribe from server-side channel %s", e.Channel)+}++func (h *eventHandler) OnServerJoin(_ *centrifuge.Client, e centrifuge.ServerJoinEvent) {+	log.Printf("Server-side join to channel %s: %s (%s)", e.Channel, e.User, e.Client)+}++func (h *eventHandler) OnServerLeave(_ *centrifuge.Client, e centrifuge.ServerLeaveEvent) {+	log.Printf("Server-side leave from channel %s: %s (%s)", e.Channel, e.User, e.Client)+}++func (h *eventHandler) OnPublish(sub *centrifuge.Subscription, e centrifuge.PublishEvent) {+	response := struct {+		UID    string `json:"uid"`+		Action string `json:"action"`+		UserID int64  `json:"userId"`+	}{}+	err := json.Unmarshal(e.Data, &response)+	if err != nil {+		log.Println(err)+		return+	}+	if response.Action != "saved" {+		log.Println("Unknown action received", string(e.Data))+	}+	dashboard, err := getRemoteDashboard(response.UID)+	if err != nil {+		log.Println(err)+		return+	}+	dashboardJSON, err := dashboard.toJSON()+	if err != nil {+		log.Println(err)+		return+	}+	ioutil.WriteFile(h.filename, []byte(dashboardJSON), 0644)+	log.Printf("%s updated from dashboard %s", h.filename, response.UID)+}++func watchDashboard(notifier grizzly.Notifier, UID, filename string) error {+	wsURL, token, err := getWSGrafanaURL("live/ws?format=json")+	if err != nil {+		return err+	}+	//mt.Sprintf("ws://%s/live/ws?format=protobuf"

debug detritus?

malcolmholmes

comment created time in a day

Pull request review commentgrafana/grizzly

watch-resource action, for live updating dashboards

+package grafana++import (+	"encoding/json"+	"fmt"+	"io/ioutil"+	"log"++	"github.com/centrifugal/centrifuge-go"+	"github.com/grafana/grizzly/pkg/grizzly"+)++type eventHandler struct {+	filename string+}++func (h *eventHandler) OnConnect(c *centrifuge.Client, e centrifuge.ConnectEvent) {+	log.Printf("Connected to chat with ID %s", e.ClientID)+	return+}++func (h *eventHandler) OnError(c *centrifuge.Client, e centrifuge.ErrorEvent) {+	log.Printf("Error: %s", e.Message)+	return+}++func (h *eventHandler) OnDisconnect(c *centrifuge.Client, e centrifuge.DisconnectEvent) {+	log.Printf("Disconnected from chat: %s", e.Reason)+	return+}+func (h *eventHandler) OnSubscribeSuccess(sub *centrifuge.Subscription, e centrifuge.SubscribeSuccessEvent) {+	log.Printf("Subscribed on channel %s, resubscribed: %v, recovered: %v", sub.Channel(), e.Resubscribed, e.Recovered)+}++func (h *eventHandler) OnSubscribeError(sub *centrifuge.Subscription, e centrifuge.SubscribeErrorEvent) {+	log.Printf("Subscribed on channel %s failed, error: %s", sub.Channel(), e.Error)+}++func (h *eventHandler) OnUnsubscribe(sub *centrifuge.Subscription, e centrifuge.UnsubscribeEvent) {+	log.Printf("Unsubscribed from channel %s", sub.Channel())+}++func (h *eventHandler) OnMessage(_ *centrifuge.Client, e centrifuge.MessageEvent) {+	log.Printf("Message from server: %s", string(e.Data))+}+func (h *eventHandler) OnServerPublish(c *centrifuge.Client, e centrifuge.ServerPublishEvent) {+	log.Printf("Publication from server-side channel %s: %s", e.Channel, e.Data)+}+func (h *eventHandler) OnServerSubscribe(_ *centrifuge.Client, e centrifuge.ServerSubscribeEvent) {+	log.Printf("Subscribe to server-side channel %s: (resubscribe: %t, recovered: %t)", e.Channel, e.Resubscribed, e.Recovered)+}++func (h *eventHandler) OnServerUnsubscribe(_ *centrifuge.Client, e centrifuge.ServerUnsubscribeEvent) {+	log.Printf("Unsubscribe from server-side channel %s", e.Channel)+}++func (h *eventHandler) OnServerJoin(_ *centrifuge.Client, e centrifuge.ServerJoinEvent) {+	log.Printf("Server-side join to channel %s: %s (%s)", e.Channel, e.User, e.Client)+}++func (h *eventHandler) OnServerLeave(_ *centrifuge.Client, e centrifuge.ServerLeaveEvent) {+	log.Printf("Server-side leave from channel %s: %s (%s)", e.Channel, e.User, e.Client)+}++func (h *eventHandler) OnPublish(sub *centrifuge.Subscription, e centrifuge.PublishEvent) {+	response := struct {

Interesting, i've always done this as a type declaration. e.g.,

var response struct {
    UID    string `json:"uid"`
    Action string `json:"action"`
    UserID int64  `json:"userId"`
}

Any particular reason you do it this way vs. that?

malcolmholmes

comment created time in a day

Pull request review commentgrafana/grizzly

watch-resource action, for live updating dashboards

 func watchCmd(config grizzly.Config) *cli.Command { 	return cmd } +func watchResourceCmd(config grizzly.Config) *cli.Command {+	cmd := &cli.Command{+		Use:   "watch-resource <uid-to-watch> <output-file>",+		Short: "watch for file changes on remove and save locally",

"on remove"? not sure what that means

malcolmholmes

comment created time in a day

PullRequestReviewEvent
PullRequestReviewEvent

startedopensignals/opensignals-services-java

started time in a day

pull request commentgrafana/jsonnet-libs

Introduce Go runtime mixin

@beorn7 whoops! Those changes didn't survive the code move between repos. Sorry about that.

sdboyer

comment created time in a day

push eventsdboyer/jsonnet-libs

sam boyer

commit sha 35b9508301e1e10461364b01f74cf7ce0fe0e3ca

Fix rate bits Also detach from upstream dashboard, it's not meaningfully related anymore

view details

sam boyer

commit sha 05cf21e0d355d51fb7b9fabca6fff31bd6670b28

Remove superfluous bit about combining rules

view details

push time in a day

startedmoorara/observer

started time in 2 days

startedopen-telemetry/opentelemetry-specification

started time in 2 days

startedraspbernetes/k8s-gitops

started time in 2 days

startedstefanprodan/podinfo

started time in 2 days

startedunifi-poller/unifi-poller

started time in 2 days

PR opened grafana/jsonnet-libs

Introduce Go runtime mixin

This adds a Go runtime mixin to our little collection.

I originally made this PR against prometheus/client-golang (https://github.com/prometheus/client_golang/pull/808), and eventually, i'd like to see it move there. However, @beorn7 raised the excellent point about the visibility of that repository, and experimenting with the "just use JSON" form of a mixin isn't appropriate to do there as a result.

So, i figure we can put this here for now, until we've time to improve it a bit - even if it's just converting it to jsonnet.

There are no rules or alerts included here, as the metrics exported from the Go runtime are too general for us to meaningfully define an alert.

+1190 -0

0 comment

4 changed files

pr created time in 4 days

create barnchsdboyer/jsonnet-libs

branch : go-runtime-mixin

created branch time in 4 days

fork sdboyer/jsonnet-libs

Grafana Labs' Jsonnet libraries

fork in 4 days

PR closed prometheus/client_golang

Add prototype Go runtime mixin

First pass at a monitoring mixin based on the runtime metrics emitted by the default Go collector. Quite bare bones, but it's just intended as a start, without any glaring flaws. It doesn't cover every emitted metric, but it gets the biggies - heap and stack use, number of goroutines, gc durations, etc.

The panels in the dashboard apply no aggregations. I waffled on this a bit, but opted for that approach on the premise that the dashboard is basic enough, and the panels show few enough individual metrics, that the dashboard itself is most likely to be helpful for folks really just getting started. (That, and, they can use the job/instance template variables to drill into a particular instance if they really need to see something that's stuck.) Very open to persuasion on changing this to an aggregated approach.

There's basic CI included to lint the jsonnet (which is almost entirely a passthrough to exported Grafana dashboard JSON). No rules or alerts as there's no way of specifying them when we're abstracted so far away in a client library.

cc @beorn7

+1242 -1

10 comments

8 changed files

sdboyer

pr closed time in 4 days

pull request commentprometheus/client_golang

Add prototype Go runtime mixin

i'd call that a good summary of the history. And an apt characterization of the oddity of our current position, though i would make one note:

looks like going back to square one and provide just dashboard JSON and rules Yaml as examples once more

Sort of square one, but things are different today because there exists this de-facto standard form for the mixin.libsonnet file, it has seen use (even if not as widespread as we might like), and there is tooling built around it, and - most crucially - it still does meet that goal of allowing a (presumably) trusted expert to provide a baseline, in contrast to the wild and wooly marketplace.

This is significant to the extent that it gives us an interface to operate behind - we can do these experiments, and as long as we're not taking away any templating capability that is present in any existing mixin, we haven't actually made anything worse.

As to Jsonnet:

If the idea is that Jsonnet isn't the best choice for templating, then sure, let's discuss another solution. But this looks like reverting the existing approach without presenting a different solution to the original problem.

When @brancz @metalmatze @tomwilkie et al. met a couple weeks ago to discuss the state of affairs, we generally agreed that even if jsonnet is part of the problem, it's not clearly enough of the problem that changing it would obviously produce a better outcome.

Increasingly, my belief is that the file formats stuff is a red herring because templating is the wrong way to think about what's we're actually doing. When we offer a template file from a repo, then expect that file to be templated and applied to running Grafana/Prom instances as fully-realized sets of rules and alerts, all context about what degrees of freedom were intended by the original template have been lost, but users are still confronted with the same editable dashboard interface as always.

The implicit premise is that the user has made all the relevant choices during templating, because they're doing infrastructure-as-code. But people - and i cannot emphasize this enough - do not write whole dashboards as code. At most, they create the dashboards in the UI, then export them to code, then maybe make small changes to them directly in code. But even that is quite onerous, and if a dashboard needs to be significantly modified, it's back to the UI, then re-export to code. That's all hard enough when it's just people maintaining their own orgs' dashboards; trying to incorporate a mixin from a third-party compounds that further.

IMO, for the goals of mixins to be properly realized, choice about how to consume and fix free variables from within a mixin must be deferred, until it can be presented to the user in the place where they actually make the rest of their choices: the UI. That's not incompatible with infra-as-code, though it does take some reimagning. i'm working on this.

All that said...

This repository is one of the most used Go repositories at all, and anything we release here, even if marked as just an intermediate step of an experiment, will inevitably be taken at face value by many, which could be quite confusing.

This is an excellent point, and i can't make any serious counterargument. So, i'm going to close this PR. We'll put this mixin in jsonnet-libs until we have better answers to these questions, and/or i have a chance to convert it to jsonnet 😄

sdboyer

comment created time in 4 days

pull request commentprometheus/client_golang

Add prototype Go runtime mixin

I can totally believe that. But what's the plans with recording and alerting rules, then? If we still provide them as jsonnet, then we still expose our users to jsonnet (but without making use of it in the dashboarding part of the mixin).

YAML for those, is the idea. See prometheus/mysqld_exporter#503 for an example. It just didn't seem like i really had any to do, here.

Providing a raw dashboard JSON file also raises the question why we have the Makefile/mixtool/jsonnetfmt contraption wrapped around it if in the end the dashboard JSON that it creates is exactly the same as the dashboard JSON provided. (I understand that it will make sense once we have more than just that one dashboard JSON file, but before we have that, it's really WIP.)

Another good question, to which i have no satisfying answer. Thoughts, @tomwilkie ?

i should note that @malcolmholmes has a (local) experiment in grizzly that can do a bidirectional json<>jsonnet transform (though the completeness of the json->jsonnet transform is a function of the completeness of the dashboard spec). Having that will, at least for me, address a lot of the concern about asking people to express dashboards in jsonnet.

sdboyer

comment created time in 6 days

pull request commentprometheus/client_golang

Add prototype Go runtime mixin

Possibly stupid question by someone not terribly familiar with Grafana: Why are there two "yaxes" each time? It appears to me we are only every using the first.

Not sure why it did that. i didn't actually mess with the axes at all. Might've been a relic of the upstream dashboard i initially pulled from.

Will make these changes!

sdboyer

comment created time in 6 days

PullRequestReviewEvent

Pull request review commentprometheus/client_golang

Add prototype Go runtime mixin

+{+  "__inputs": [],+  "__requires": [+    {+      "type": "grafana",+      "id": "grafana",+      "name": "Grafana",+      "version": "7.0.4"+    },+    {+      "type": "panel",+      "id": "graph",+      "name": "Graph",+      "version": ""+    },+    {+      "type": "datasource",+      "id": "prometheus",+      "name": "Prometheus",+      "version": "1.0.0"+    }+  ],+  "annotations": {+    "list": [+      {+        "builtIn": 1,+        "datasource": "-- Grafana --",+        "enable": true,+        "hide": true,+        "iconColor": "rgba(0, 211, 255, 1)",+        "name": "Annotations & Alerts",+        "type": "dashboard"+      }+    ]+  },+  "description": "Go runtime metrics",+  "editable": true,+  "gnetId": 13076,+  "graphTooltip": 0,+  "id": null,+  "iteration": 1602794777869,+  "links": [],+  "panels": [+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Total bytes of memory reserved by the process.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 16,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: sys",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Total Reserved Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 0+      },+      "hiddenSeries": false,+      "id": 24,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_stack_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}} stack inuse",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Stack Memory Use",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reservations by the runtime, not for stack or heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 26,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_mspan_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mspan sys",+          "refId": "B"+        },+        {+          "expr": "go_memstats_mcache_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: mcache sys",+          "refId": "D"+        },+        {+          "expr": "go_memstats_buck_hash_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: buck hash sys",+          "refId": "E"+        },+        {+          "expr": "go_memstats_gc_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: gc sys",+          "refId": "F"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Other Memory Reservations",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Memory reserved, and actually in use, by the heap",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 8+      },+      "hiddenSeries": false,+      "id": 12,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "go_memstats_heap_sys_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap reserved",+          "refId": "B"+        },+        {+          "expr": "go_memstats_heap_inuse_bytes{job=\"$job\", instance=~\"$instance\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap in use",+          "refId": "A"+        },+        {+          "expr": "go_memstats_heap_alloc_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap alloc",+          "refId": "C"+        },+        {+          "expr": "go_memstats_heap_idle_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap idle",+          "refId": "D"+        },+        {+          "expr": "go_memstats_heap_released_bytes{job=~\"tns_app\",instance=~\".*\"}",+          "interval": "",+          "legendFormat": "{{instance}}: heap released",+          "refId": "E"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Heap Memory",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "decbytes",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 0,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 14,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 1,+      "points": true,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_alloc_bytes_total{job=\"$job\", instance=~\"$instance\"}[$__interval])",+          "interval": "",+          "legendFormat": "{{instance}}: malloc/min",+          "refId": "A"+        }+      ],+      "thresholds": [],+      "timeFrom": null,+      "timeRegions": [],+      "timeShift": null,+      "title": "Allocation Rate, Bytes",+      "tooltip": {+        "shared": true,+        "sort": 0,+        "value_type": "individual"+      },+      "type": "graph",+      "xaxis": {+        "buckets": null,+        "mode": "time",+        "name": null,+        "show": true,+        "values": []+      },+      "yaxes": [+        {+          "format": "Bps",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": true+        },+        {+          "format": "short",+          "label": null,+          "logBase": 1,+          "max": null,+          "min": null,+          "show": false+        }+      ],+      "yaxis": {+        "align": false,+        "alignLevel": null+      }+    },+    {+      "aliasColors": {},+      "bars": false,+      "dashLength": 10,+      "dashes": false,+      "datasource": "$datasource",+      "description": "Rate of heap object allocation.",+      "fieldConfig": {+        "defaults": {+          "custom": {}+        },+        "overrides": []+      },+      "fill": 1,+      "fillGradient": 0,+      "gridPos": {+        "h": 8,+        "w": 12,+        "x": 12,+        "y": 16+      },+      "hiddenSeries": false,+      "id": 20,+      "legend": {+        "avg": false,+        "current": false,+        "max": false,+        "min": false,+        "show": true,+        "total": false,+        "values": false+      },+      "lines": true,+      "linewidth": 1,+      "links": [],+      "nullPointMode": "null",+      "options": {+        "dataLinks": []+      },+      "percentage": false,+      "pointradius": 2,+      "points": false,+      "renderer": "flot",+      "seriesOverrides": [],+      "spaceLength": 10,+      "stack": false,+      "steppedLine": false,+      "targets": [+        {+          "expr": "rate(go_memstats_mallocs_total{job=\"$job\", instance=~\"$instance\"}[$__interval])",

i was wondering about this, and figured i probably got it wrong with just $__interval and not setting a min step.

AFAIK we don't have any restrictions, but i'll double-check. (Seems to me that providing a nudge to update oughtn't be a bad thing.)

sdboyer

comment created time in 6 days

PullRequestReviewEvent

push eventsdboyer/client_golang

sam boyer

commit sha 6254ebbfd0741849c0d075d7cc87a0578d915fa4

FIx directory for mixin in CI Signed-off-by: sam boyer <sam.boyer@grafana.com>

view details

push time in 6 days

push eventsdboyer/client_golang

sam boyer

commit sha 17cd19436014c11761d29aa12398417ca135cfcf

Change file layout, fix nits and typos Signed-off-by: sam boyer <sam.boyer@grafana.com>

view details

push time in 7 days

Pull request review commentprometheus/client_golang

Add prototype Go runtime mixin

+# Go Runtime Mixin++_This mixin is a work in progress. We aim for it to become a good role model for+dashboards eventually, but it's not there yet._++Mixins are a collection of configurable, reusable Prometheus rules, alerts+and/or Grafana dashboards for a particular system, usually created by experts+in that system. By [applying them]() to Prometheus and Grafana, you can quickly

i think i'm actually just gonna remove this for now - eventually i want that to be a link, but the docs to which i would link aren't really written yet

sdboyer

comment created time in 7 days

PullRequestReviewEvent

Pull request review commentprometheus/client_golang

Add prototype Go runtime mixin

+# Go Runtime Mixin++_This mixin is a work in progress. We aim for it to become a good role model for+dashboards eventually, but it's not there yet._++Mixins are a collection of configurable, reusable Prometheus rules, alerts+and/or Grafana dashboards for a particular system, usually created by experts+in that system. By [applying them]() to Prometheus and Grafana, you can quickly

whoops!

sdboyer

comment created time in 7 days

PullRequestReviewEvent

pull request commentprometheus/client_golang

Add prototype Go runtime mixin

Thanks for the review!

A bit more clarity, before you look at the dashboard itself - i elected not to try to create panels for all the metrics (particularly the more abstruse ones), and more could be done to explain them. The bar we've been aiming for with the first pass is "not obviously wrong."

In the other mixins, we use the grafana-builder or the grafonnet libraries to build dashboards.

We've been experimenting with just providing raw JSON, rather than generated jsonnet, as a way of trying to make creating these more accessible - it's generally held that jsonnet is one of the barriers to entry with mixins. i do feel like this form is a bit clunkier, but as this is really intended to be a first pass that we can iteratively improve, i figured i'd try out this pattern.

I'd assume in the raw dashboard JSON form, it's much harder to override, amend, or modify dashboards than in the Jsonnet form used for grafana-builder or grafonnet.

i have heard some concerns expressed in a similar vein. I'm a bit circumspect about such amendments and overrides in general - i think they're clunky, error-prone, and don't compose particularly well. That doesn't make it not a real concern, of course.

For now, i'm inclined to keep with the "just use JSON" experiment, and see how it pans out for a bit. However, if you have a strong preference, i'm happy to put them in the traditional form.

The example directory is perhaps quite close to that. Could we move the mixin directory into it, adjusting its description accordingly?

i haven't noticed that in the rash of recent mixin work, but i've no particularly strong opinion on this. Will make the move.

Perhaps also call it go-mixin or go-runtime-mixin as this more specific naming is what we have done in other mixins so far.

This was bothering me, too. I'll do go-runtime-mixin, as that's really what this is.

sdboyer

comment created time in 7 days

push eventsdboyer/client_golang

sam boyer

commit sha e42a262c0caf8793ef776475a7dd0647e9908d1c

Update README.md Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com> Signed-off-by: sam boyer <sam.boyer@grafana.com>

view details

push time in 7 days

push eventsdboyer/client_golang

sam boyer

commit sha 675e56c7d3591997eb8ca6d0d08e3d156edb7f9a

Update README.md Co-authored-by: Kemal Akkoyun <kakkoyun@users.noreply.github.com>

view details

push time in 7 days

push eventsdboyer/client_golang

sam boyer

commit sha 4507d05e5c8f9e1920cfb5aa7d2a862a64aa1663

Newlines! Signed-off-by: sam boyer <sam.boyer@grafana.com>

view details

push time in 8 days

push eventsdboyer/client_golang

sam boyer

commit sha 28f3f78e70043ceba7f20fe0b582a4ad60965156

Newlines!

view details

push time in 8 days

push eventsdboyer/client_golang

sam boyer

commit sha 34dda9b13b6cc49f09137dd53bb8b52c1c2746be

Fix circleci job Signed-off-by: sam boyer <sam.boyer@grafana.com>

view details

push time in 8 days

push eventsdboyer/client_golang

sam boyer

commit sha 83c130b2f9696bf2a1d20fe93dc7634e44fbf72e

Fix circleci job

view details

push time in 8 days

push eventsdboyer/client_golang

sam boyer

commit sha 5597087f959409d403a3b8edc7c189c464b2a07d

Fix circleci job

view details

push time in 8 days

push eventsdboyer/client_golang

beorn7

commit sha 85aa957f631d2e252dade63ca7138946197a772c

Export MetricVec (again) MetricVec was already exported in early versions of this library, but nobody really used it to implement vectors of custom Metric implementations. Now #796 has shown up with a fairly special use case for which I'd prefer a custom implementation of a special "auto-sampling histogram" outside of this library. Therefore, I'd like to reinstate support for creating vectors of custom Metric implementations. I played around for quite some while with the option of a separate package providing the tools one would need to create vectors of custom Metric implementations. However, with the current structure of the prometheus/client_golang/prometheus package, this leads to a lot of complications with circular dependencies. (The new package would need the primitives from the prometheus package, while the existing metric vectors like GaugeVec need to import the new vector package to not duplicate the implementation. Separating vector types from the main prometheus package is out of the question at this point because that would be a breaking change.) Signed-off-by: beorn7 <beorn@grafana.com>

view details

Björn Rabenstein

commit sha e6ea98bdda971dabab09e8d93a8d65885460fd1e

Merge pull request #803 from prometheus/beorn7/vec Export MetricVec (again)

view details

beorn7

commit sha 3d1759b4c60802e6525503486a0fb1209cd46ab9

Run check for unused/missing Go packages only against latest Go version The tidied up `go.mod` file tends to change between Go versions. Signed-off-by: beorn7 <beorn@grafana.com>

view details

beorn7

commit sha ded247442080dbf80b322f90d38e0309f18761fd

Update dependencies Signed-off-by: beorn7 <beorn@grafana.com>

view details

beorn7

commit sha 67f573aafe0f2bf815446c4a98d5ba96e7b61325

Cut v1.8.0 Signed-off-by: beorn7 <beorn@grafana.com>

view details

Björn Rabenstein

commit sha 47cfdc9bb8ceaf18b12a4b7ba778b06e12d1a97a

Merge pull request #806 from prometheus/beorn7/release Cut v1.8.0

view details

sam boyer

commit sha 35ebbffba0106590a7ea0a6412ae6e641964df41

Add prototype Go runtime mixin As a first pass, just one dashboard to display metrics emitted by the default runtime collector. Signed-off-by: sam boyer <sam.boyer@grafana.com>

view details

push time in 8 days

push eventsdboyer/client_golang

sam boyer

commit sha d2e720e1ff3b9d0b919c49d3045d9a6ed42e57e5

Add prototype Go runtime mixin As a first pass, just one dashboard to display metrics emitted by the default runtime collector. Signed-off-by: sam boyer <sam.boyer@grafana.com>

view details

push time in 8 days

PR opened prometheus/client_golang

Add prototype Go runtime mixin

First pass at a monitoring mixin based on the runtime metrics emitted by the default Go collector. Quite bare bones, but it's just intended as a start, without any glaring flaws. It doesn't cover every emitted metric, but it gets the biggies - heap and stack use, number of goroutines, gc durations, etc.

The panels in the dashboard apply no aggregations. I waffled on this a bit, but opted for that approach on the premise that the dashboard is basic enough, and the panels show few enough individual metrics, that the dashboard itself is most likely to be helpful for folks really just getting started. (That, and, they can use the job/instance template variables to drill into a particular instance if they really need to see something that's stuck.) Very open to persuasion on changing this to an aggregated approach.

There's basic CI included to lint the jsonnet (which is almost entirely a passthrough to exported Grafana dashboard JSON). No rules or alerts as there's no way of specifying them when we're abstracted so far away in a client library.

cc @beorn7

+1242 -0

0 comment

8 changed files

pr created time in 8 days

create barnchsdboyer/client_golang

branch : introduce-runtime-mixin

created branch time in 8 days

fork sdboyer/client_golang

Prometheus instrumentation library for Go applications

fork in 8 days

Pull request review commentprometheus/mysqld_exporter

Add prototype MySQL mixin.

+module github.com/prometheus/mysqld_exporter/mysqld_mixin
module github.com/prometheus/mysqld_exporter/mysqld-mixin
tomwilkie

comment created time in 8 days

PullRequestReviewEvent

startedmetalmatze/slo-libsonnet

started time in a month

pull request commentgrafana/grafana

POC: load dashboard json from a plugin

Brilliant, thank you for taking first steps here! I definitely agree that standardizing on some approaches to programatically generated dashboards has enormous potential.

and figure out how this will integrate into a unified search later.

For my edification - when you say "unified search," you're referring dashboard search, correct?

ryantxu

comment created time in a month

Pull request review commentgrafana/tanka

refactor(api): use structs

 package tanka  import ( 	"github.com/grafana/tanka/pkg/jsonnet"-	"github.com/grafana/tanka/pkg/kubernetes" 	"github.com/grafana/tanka/pkg/process" ) -// parseModifiers parses all modifiers into an options struct-func parseModifiers(mods []Modifier) *options {-	o := &options{}-	for _, mod := range mods {-		mod(o)-	}-	return o-}--type options struct {-	// `std.extVar`-	jsonnet jsonnet.Opts--	// target regular expressions to limit the working set-	targets process.Matchers--	// additional options for diff-	diff kubernetes.DiffOpts--	// additional options for apply-	apply kubernetes.ApplyOpts-}--// Modifier allow to influence the behavior of certain `tanka.*` actions. They-// are roughly equivalent to flags on the command line. See the `tanka.With*`-// functions for available options.-type Modifier func(*options)--// WithExtCode allows to pass external variables (jsonnet code) to the VM-func WithExtCode(code map[string]string) Modifier {-	return func(opts *options) {-		opts.jsonnet.ExtCode = code-	}-}--func WithTLACode(code map[string]string) Modifier {-	return func(opts *options) {-		opts.jsonnet.TLACode = code-	}-}--// WithTargets allows to submit regular expressions to limit the working set of-// objects (https://tanka.dev/output-filtering/).-func WithTargets(t process.Matchers) Modifier {-	return func(opts *options) {-		opts.targets = t-	}-}--// WithDiffStrategy allows to set the used diff strategy.-// An empty string is ignored.-func WithDiffStrategy(ds string) Modifier {-	return func(opts *options) {-		if ds != "" {-			opts.diff.Strategy = ds-		}-	}-}+// Opts specify general, optional properties that apply to all actions+type Opts struct {+	JsonnetOpts -// WithDiffSummarize enables summary mode, which invokes `diffstat(1)` on the-// set of changes to create an overview-func WithDiffSummarize(b bool) Modifier {-	return func(opts *options) {-		opts.diff.Summarize = b-	}+	// Filters are used to optionally select a subset of the resources+	Filters process.Matchers } -// WithApplyForce allows to invoke `kubectl apply` with the `--force` flag-func WithApplyForce(b bool) Modifier {-	return func(opts *options) {-		opts.apply.Force = b-	}-}--// WithApplyValidate allows to invoke `kubectl apply` with the `--validate=false` flag-func WithApplyValidate(b bool) Modifier {-	return func(opts *options) {-		opts.apply.Validate = b-	}-}--// WithApplyAutoApprove allows to skip the interactive approval-func WithApplyAutoApprove(b bool) Modifier {-	return func(opts *options) {-		opts.apply.AutoApprove = b-	}-}+type JsonnetOpts = jsonnet.Opts

Are you type aliasing so that the embedded property on Opts is named Opts.JsonnetOpts instead of Opts.Opts?

sh0rez

comment created time in 2 months

PullRequestReviewEvent
PullRequestReviewEvent

PR opened grafana/tutorials

Wordsmithing on events, fix broken link

The wording on event annotations was a bit scattered; i tried fixing it up.

The "Alert Rules" link was outdated/broken on the final slide. Not sure there's a direct analogue in the new page structure, but i took a guess.

+2 -6

0 comment

1 changed file

pr created time in 2 months

create barnchgrafana/tutorials

branch : sdboyer-patch-1

created branch time in 2 months

startedsharkdp/bat

started time in 2 months

PR opened cncf/gitdm

Update affiliations for sdboyer

Thanks!

+4 -2

0 comment

1 changed file

pr created time in 2 months

push eventsdboyer/gitdm

sam boyer

commit sha e65133726a17422becc8755f69112bb642f84dbd

Update affiliations for sdboyer

view details

push time in 2 months

fork sdboyer/gitdm

📜Fork for tracking CNCF projects

https://cncf.io

fork in 2 months

startedrepology/repology-updater

started time in 2 months

startedPeltoche/lsd

started time in 2 months

startedgoogle/triage-party

started time in 2 months

startedmicrosoft/TypeScript

started time in 3 months

more