App-specific metrics (songs played, library, sync, DB pool) #37

Open
opened 2026-10-10 21:50:32 +02:00 by Sansan · 0 comments
Owner

Background

Depends on: "Expose Prometheus /metrics on a separate port".

Beyond HTTP and runtime stats, a few domain metrics would make the dashboard useful for the game itself. Below are suggestions; pick and adjust. Prefix everything with musicserver_.

Suggested metrics

Metric | Type | Where to update -- | -- | -- musicserver_songs_played_total{mode} | Counter | backend.SetPlayed / AddLatestPlayed; mode = random, low, classic, next... (keep it to a small fixed set) musicserver_songs_requested_total{mode} | Counter | GetRandomSong, GetRandomSongLowChance, GetRandomSongClassic, GetNextSong musicserver_library_soundtracks | Gauge | Set at the end of syncSoundtracks(full) musicserver_library_songs | Gauge | Same as above musicserver_sync_duration_seconds{type} | Histogram | Wrap syncSoundtracks; type = full / changes musicserver_sync_last_success_timestamp_seconds | Gauge | SetToCurrentTime() after a successful sync musicserver_broken_songs | Gauge | Count in checkBrokenSongs musicserver_db_pool_* | Collector | Register a collector over pgxpool.Pool.Stat() (acquired/idle/total conns, acquire wait time); github.com/IBM/pgxpoolprometheus does this out of the box

Example:

var LibrarySongs = promauto.NewGauge(prometheus.GaugeOpts{
Name: "musicserver_library_songs",
Help: "Number of songs in the library after the last sync.",
})" class="epitaxy-diff epitaxy-fence rounded-lg overflow-clip" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; border-radius: 8px; overflow: clip; --diffs-font-size: calc(.75rem * 1); --diffs-line-height: calc(1.0625rem * 1); --diffs-font-family: "anthropic-mono", ui-monospace, monospace, "SF Mono", ui-monospace, Menlo, Consolas, monospace; --diffs-header-font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "PingFang TC", "Hiragino Sans", "Apple SD Gothic Neo", sans-serif; --diffs-addition-color-override: #32d74b; --diffs-deletion-color-override: #ff2c56; --diffs-modified-color-override: #6da7ec; --diffs-gap-inline: calc(.5rem * 1); --diffs-gap-block: calc(.25rem * 1); position: relative;">
// internal/metrics/app.go
var SongsPlayed = promauto.NewCounterVec(prometheus.CounterOpts{
Name: "musicserver_songs_played_total",
Help: "Songs marked as played, by selection mode.",
}, []string{"mode"})

var LibrarySongs = promauto.NewGauge(prometheus.GaugeOpts{
Name: "musicserver_library_songs",
Help: "Number of songs in the library after the last sync.",
})
// DB pool metrics, e.g. in server.NewServerInstance after the DB is created
prometheus.MustRegister(pgxpoolprometheus.NewCollector(database.Pool, map[string]string{"db_name": dbName}))

Rules of thumb

  • Never use song titles, IDs, tokens or IPs as label values, because each unique value creates a new time series. Put that detail in logs instead; Loki already collects them.
  • Counters only go up (use _total). Gauges hold a current value.

Acceptance criteria

  • not doneThe chosen metrics appear on /metrics with HELP text
  • not donePanels added to the Grafana MusicServer dashboard (songs played/hour, library size, last sync age)
<h3 style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-size: 15px; font-weight: 580; font-variation-settings: &quot;wght&quot; 540; letter-spacing: -0.01em; margin-block: 20px 6px; padding-block: 0px; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Background</h3><p style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Depends on: "Expose Prometheus /metrics on a separate port".</p><p style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Beyond HTTP and runtime stats, a few<span> </span><strong style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-weight: 500; --cds-font-axis-wght: &quot;wght&quot; 560,; font-variation-settings: &quot;GRAD&quot; 0, &quot;wght&quot; 560;">domain metrics</strong><span> </span>would make the dashboard useful for the game itself. Below are suggestions; pick and adjust. Prefix everything with<span> </span><code data-epitaxy-inline-code="" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-family: anthropic-mono, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; font-feature-settings: &quot;calt&quot; 0, &quot;liga&quot; 0; font-variation-settings: normal; font-size: 12px; font-variant-ligatures: none; background: none 0% 0% / auto repeat scroll padding-box border-box color(srgb 1 1 1 / 0.05); color: rgb(240, 239, 236); border-radius: 4px; padding-block: 1px; padding-inline: 2px; line-height: 1.4;">musicserver_</code>.</p><h3 style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-size: 15px; font-weight: 580; font-variation-settings: &quot;wght&quot; 540; letter-spacing: -0.01em; margin-block: 20px 6px; padding-block: 0px; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Suggested metrics</h3><div class="epitaxy-table-scroll" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: auto; app-region: initial; scrollbar-color: auto; overflow-x: auto; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"> Metric | Type | Where to update -- | -- | -- musicserver_songs_played_total{mode} | Counter | backend.SetPlayed / AddLatestPlayed; mode = random, low, classic, next... (keep it to a small fixed set) musicserver_songs_requested_total{mode} | Counter | GetRandomSong, GetRandomSongLowChance, GetRandomSongClassic, GetNextSong musicserver_library_soundtracks | Gauge | Set at the end of syncSoundtracks(full) musicserver_library_songs | Gauge | Same as above musicserver_sync_duration_seconds{type} | Histogram | Wrap syncSoundtracks; type = full / changes musicserver_sync_last_success_timestamp_seconds | Gauge | SetToCurrentTime() after a successful sync musicserver_broken_songs | Gauge | Count in checkBrokenSongs musicserver_db_pool_* | Collector | Register a collector over pgxpool.Pool.Stat() (acquired/idle/total conns, acquire wait time); github.com/IBM/pgxpoolprometheus does this out of the box </div><p style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Example:</p><div class="epitaxy-codeblock relative max-w-full w-fit min-w-[min(100%,318px)]" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; position: relative; width: fit-content; max-width: 100%; min-width: min(100%, 318px); margin-block: 4px; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div class="relative" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; position: relative;"><div data-code-text="// internal/metrics/app.go var SongsPlayed = promauto.NewCounterVec(prometheus.CounterOpts{ Name: &quot;musicserver_songs_played_total&quot;, Help: &quot;Songs marked as played, by selection mode.&quot;, }, []string{&quot;mode&quot;}) var LibrarySongs = promauto.NewGauge(prometheus.GaugeOpts{ Name: &quot;musicserver_library_songs&quot;, Help: &quot;Number of songs in the library after the last sync.&quot;, })" class="epitaxy-diff epitaxy-fence rounded-lg overflow-clip" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; border-radius: 8px; overflow: clip; --diffs-font-size: calc(.75rem * 1); --diffs-line-height: calc(1.0625rem * 1); --diffs-font-family: &quot;anthropic-mono&quot;, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; --diffs-header-font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; --diffs-addition-color-override: #32d74b; --diffs-deletion-color-override: #ff2c56; --diffs-modified-color-override: #6da7ec; --diffs-gap-inline: calc(.5rem * 1); --diffs-gap-block: calc(.25rem * 1); position: relative;"><diffs-container style="--diffs-font-fallback: &quot;SF Mono&quot;, Monaco, Consolas, &quot;Ubuntu Mono&quot;, &quot;Liberation Mono&quot;, &quot;Courier New&quot;, monospace; --diffs-header-font-fallback: system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, &quot;Noto Sans&quot;, &quot;Liberation Sans&quot;, Arial, sans-serif; --diffs-mixer: light-dark(#000, #fff); --diffs-gap-fallback: 8px; --diffs-scrollbar-gutter-fallback: 6px; --diffs-scrollbar-gutter: 0px; --diffs-added-light: #0dbe4e; --diffs-added-dark: #5ecc71; --diffs-modified-light: #009fff; --diffs-modified-dark: #69b1ff; --diffs-deleted-light: #ff2e3f; --diffs-deleted-dark: #ff6762; --diffs-warning-light: #d5a910; --diffs-warning-dark: #ffd452; color-scheme: dark; font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 12px; line-height: 17px; font-feature-settings: normal; --diffs-bg: light-dark(#ffffff, #1e1e2e); --diffs-bg-buffer: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92%, light-dark(#000, #fff))); --diffs-bg-context: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 98.5%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92.5%, light-dark(#000, #fff))); --diffs-bg-context-gutter: light-dark(color-mix(in lab, light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 98.5%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92.5%, light-dark(#000, #fff))) 90%, light-dark(#ffffff, #1e1e2e)), color-mix(in lab, light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 98.5%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92.5%, light-dark(#000, #fff))) 45%, light-dark(#ffffff, #1e1e2e))); --diffs-bg-separator: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 96%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 85%, light-dark(#000, #fff))); --diffs-fg: light-dark(#1a1a1a, #cdd6f4); --diffs-fg-number: light-dark(color-mix(in lab, light-dark(#1a1a1a, #cdd6f4) 65%, light-dark(#ffffff, #1e1e2e)), color-mix(in lab, light-dark(#1a1a1a, #cdd6f4) 65%, light-dark(#ffffff, #1e1e2e))); --diffs-fg-conflict-marker: light-dark(color-mix(in lab, light-dark(#1a1a1a, #cdd6f4) 65%, light-dark(#ffffff, #1e1e2e)), color-mix(in lab, light-dark(#1a1a1a, #cdd6f4) 65%, light-dark(#ffffff, #1e1e2e))); --diffs-deletion-base: #ff2c56; --diffs-addition-base: #32d74b; --diffs-modified-base: #6da7ec; --diffs-bg-deletion: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 88%, #ff2c56), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 80%, #ff2c56)); --diffs-bg-deletion-emphasis: light-dark(rgb(from #ff2c56 r g b / .15), rgb(from #ff2c56 r g b / .2)); --diffs-bg-addition: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 88%, #32d74b), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 80%, #32d74b)); --diffs-bg-addition-emphasis: light-dark(rgb(from #32d74b r g b / .15), rgb(from #32d74b r g b / .2)); --diffs-selection-base: #6da7ec; --diffs-selection-number-fg: light-dark(color-mix(in lab, #6da7ec 65%, light-dark(#000, #fff)), color-mix(in lab, #6da7ec 75%, light-dark(#000, #fff))); background-color: rgb(30, 30, 46); color: rgb(205, 214, 244); display: block; --diffs-scrollbar-gutter-measured: 0px; --diffs-dark: #cdd6f4; --diffs-dark-bg: #1e1e2e; --diffs-dark-addition-color: #a6e3a1; --diffs-dark-deletion-color: #f38ba8; --diffs-dark-modified-color: #f9e2af; --diffs-light: #1a1a1a; --diffs-light-bg: #ffffff; --diffs-light-addition-color: #1e9e3c; --diffs-light-deletion-color: #ff3a30; --diffs-light-modified-color: #0073e6; box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; --lightningcss-light: ; --lightningcss-dark: initial;"><pre data-file="" data-disable-line-numbers="" data-overflow="wrap" style="box-sizing: border-box; isolation: isolate; font-family: anthropic-mono, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; outline: none; margin: 0px; padding: 8px 45.1999px 8px 17.1999px; display: block; background-color: rgb(30, 30, 46); --diffs-grid-number-column-width: minmax(min-content, max-content); --diffs-code-grid: minmax(min-content, max-content) 1fr; letter-spacing: calc(-1ch + round(up, 1ch, 0.015625px)); font-feature-settings: &quot;liga&quot;, &quot;clig&quot;, &quot;calt&quot;; --diffs-min-number-column-width-default: 2ch;"><code data-code="" style="box-sizing: border-box; isolation: isolate; font-family: anthropic-mono, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; outline: none; margin: 0px; padding: 4px 0px; display: grid; background-color: rgb(30, 30, 46); contain: content; grid-auto-flow: dense; grid-template-columns: minmax(min-content, max-content) 1fr; overflow: clip; overscroll-behavior-x: none; tab-size: 2; scrollbar-gutter: stable; align-self: flex-start; padding-block: 0px;"><div data-gutter="" style="box-sizing: border-box; grid-template-rows: subgrid; grid-template-columns: subgrid; z-index: 3; background-color: rgb(30, 30, 46); grid-area: span 10 / 1; display: grid; position: relative;"><div data-line-type="context" data-column-number="1" data-line-index="0" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="2" data-line-index="1" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="3" data-line-index="2" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="4" data-line-index="3" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="5" data-line-index="4" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="6" data-line-index="5" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="7" data-line-index="6" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="8" data-line-index="7" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="9" data-line-index="8" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="10" data-line-index="9" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div></div><div data-content="" style="box-sizing: border-box; grid-template-rows: subgrid; grid-template-columns: subgrid; background-color: rgb(30, 30, 46); grid-area: span 10 / 2; min-width: 0px; display: grid;"><div data-line="1" data-line-type="context" data-line-index="0" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #999999; --diffs-token-light-font-style: italic; --diffs-token-dark: #9399B2; --diffs-token-dark-font-style: italic;">// internal/metrics/app.go</span></div><div data-line="2" data-line-type="context" data-line-index="1" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(203, 166, 247); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(203, 166, 247); --diffs-token-light: #C5621B; --diffs-token-dark: #CBA6F7;">var</span><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> SongsPlayed </span><span style="box-sizing: border-box; color: rgb(148, 226, 213); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(148, 226, 213); --diffs-token-light: #737373; --diffs-token-dark: #94E2D5;">=</span><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> promauto</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">.</span><span style="box-sizing: border-box; color: rgb(137, 180, 250); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(137, 180, 250); --diffs-token-light: #0073E6; --diffs-token-light-font-style: inherit; --diffs-token-dark: #89B4FA; --diffs-token-dark-font-style: italic;">NewCounterVec</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">(</span><span style="box-sizing: border-box; color: rgb(249, 226, 175); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(249, 226, 175); --diffs-token-light: #8E6BD9; --diffs-token-light-font-style: inherit; --diffs-token-dark: #F9E2AF; --diffs-token-dark-font-style: italic;">prometheus</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">.</span><span style="box-sizing: border-box; color: rgb(249, 226, 175); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(249, 226, 175); --diffs-token-light: #8E6BD9; --diffs-token-light-font-style: inherit; --diffs-token-dark: #F9E2AF; --diffs-token-dark-font-style: italic;">CounterOpts</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">{</span></div><div data-line="3" data-line-type="context" data-line-index="2" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> Name</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">:</span><span style="box-sizing: border-box; color: rgb(166, 227, 161); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(166, 227, 161); --diffs-token-light: #1E9E3C; --diffs-token-dark: #A6E3A1;"> "musicserver_songs_played_total"</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">,</span></div><div data-line="4" data-line-type="context" data-line-index="3" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> Help</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">:</span><span style="box-sizing: border-box; color: rgb(166, 227, 161); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(166, 227, 161); --diffs-token-light: #1E9E3C; --diffs-token-dark: #A6E3A1;"> "Songs marked as played, by selection mode."</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">,</span></div><div data-line="5" data-line-type="context" data-line-index="4" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">},</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;"> []</span><span style="box-sizing: border-box; color: rgb(203, 166, 247); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(203, 166, 247); --diffs-token-light: #C5621B; --diffs-token-dark: #CBA6F7;">string</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">{</span><span style="box-sizing: border-box; color: rgb(166, 227, 161); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(166, 227, 161); --diffs-token-light: #1E9E3C; --diffs-token-dark: #A6E3A1;">"mode"</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">})</span></div><div data-line="6" data-line-type="context" data-line-index="5" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"> </div><div data-line="7" data-line-type="context" data-line-index="6" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(203, 166, 247); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(203, 166, 247); --diffs-token-light: #C5621B; --diffs-token-dark: #CBA6F7;">var</span><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> LibrarySongs </span><span style="box-sizing: border-box; color: rgb(148, 226, 213); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(148, 226, 213); --diffs-token-light: #737373; --diffs-token-dark: #94E2D5;">=</span><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> promauto</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">.</span><span style="box-sizing: border-box; color: rgb(137, 180, 250); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(137, 180, 250); --diffs-token-light: #0073E6; --diffs-token-light-font-style: inherit; --diffs-token-dark: #89B4FA; --diffs-token-dark-font-style: italic;">NewGauge</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">(</span><span style="box-sizing: border-box; color: rgb(249, 226, 175); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(249, 226, 175); --diffs-token-light: #8E6BD9; --diffs-token-light-font-style: inherit; --diffs-token-dark: #F9E2AF; --diffs-token-dark-font-style: italic;">prometheus</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">.</span><span style="box-sizing: border-box; color: rgb(249, 226, 175); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(249, 226, 175); --diffs-token-light: #8E6BD9; --diffs-token-light-font-style: inherit; --diffs-token-dark: #F9E2AF; --diffs-token-dark-font-style: italic;">GaugeOpts</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">{</span></div><div data-line="8" data-line-type="context" data-line-index="7" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> Name</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">:</span><span style="box-sizing: border-box; color: rgb(166, 227, 161); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(166, 227, 161); --diffs-token-light: #1E9E3C; --diffs-token-dark: #A6E3A1;"> "musicserver_library_songs"</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">,</span></div><div data-line="9" data-line-type="context" data-line-index="8" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> Help</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">:</span><span style="box-sizing: border-box; color: rgb(166, 227, 161); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(166, 227, 161); --diffs-token-light: #1E9E3C; --diffs-token-dark: #A6E3A1;"> "Number of songs in the library after the last sync."</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">,</span></div><div data-line="10" data-line-type="context" data-line-index="9" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">})</span></div></div></code></pre></diffs-container></div><div class="pointer-events-none absolute inset-y-0 right-1.75 flex items-start overflow-y-clip pb-0.5" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px 0px 2px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: flex; pointer-events: none; position: absolute; inset-block: 0px; right: 7px; align-items: flex-start; overflow-y: clip;"><div class="pointer-events-auto sticky flex gap-0.75 top-[calc(max(var(--epitaxy-top-fade-height,0px),var(--fade-top,0px))+5px)] mt-1.25" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 5px 0px 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: flex; pointer-events: auto; position: sticky; top: 5px; gap: 3px;"></div></div></div></div><div class="epitaxy-codeblock relative max-w-full w-fit min-w-[min(100%,318px)]" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; position: relative; width: fit-content; max-width: 100%; min-width: min(100%, 318px); margin-block: 4px; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><div class="relative" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; position: relative;"><div data-code-text="// DB pool metrics, e.g. in server.NewServerInstance after the DB is created prometheus.MustRegister(pgxpoolprometheus.NewCollector(database.Pool, map[string]string{&quot;db_name&quot;: dbName}))" class="epitaxy-diff epitaxy-fence rounded-lg overflow-clip" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; border-radius: 8px; overflow: clip; --diffs-font-size: calc(.75rem * 1); --diffs-line-height: calc(1.0625rem * 1); --diffs-font-family: &quot;anthropic-mono&quot;, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; --diffs-header-font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; --diffs-addition-color-override: #32d74b; --diffs-deletion-color-override: #ff2c56; --diffs-modified-color-override: #6da7ec; --diffs-gap-inline: calc(.5rem * 1); --diffs-gap-block: calc(.25rem * 1); position: relative;"><diffs-container style="--diffs-font-fallback: &quot;SF Mono&quot;, Monaco, Consolas, &quot;Ubuntu Mono&quot;, &quot;Liberation Mono&quot;, &quot;Courier New&quot;, monospace; --diffs-header-font-fallback: system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, &quot;Noto Sans&quot;, &quot;Liberation Sans&quot;, Arial, sans-serif; --diffs-mixer: light-dark(#000, #fff); --diffs-gap-fallback: 8px; --diffs-scrollbar-gutter-fallback: 6px; --diffs-scrollbar-gutter: 0px; --diffs-added-light: #0dbe4e; --diffs-added-dark: #5ecc71; --diffs-modified-light: #009fff; --diffs-modified-dark: #69b1ff; --diffs-deleted-light: #ff2e3f; --diffs-deleted-dark: #ff6762; --diffs-warning-light: #d5a910; --diffs-warning-dark: #ffd452; color-scheme: dark; font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 12px; line-height: 17px; font-feature-settings: normal; --diffs-bg: light-dark(#ffffff, #1e1e2e); --diffs-bg-buffer: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92%, light-dark(#000, #fff))); --diffs-bg-context: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 98.5%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92.5%, light-dark(#000, #fff))); --diffs-bg-context-gutter: light-dark(color-mix(in lab, light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 98.5%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92.5%, light-dark(#000, #fff))) 90%, light-dark(#ffffff, #1e1e2e)), color-mix(in lab, light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 98.5%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 92.5%, light-dark(#000, #fff))) 45%, light-dark(#ffffff, #1e1e2e))); --diffs-bg-separator: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 96%, light-dark(#000, #fff)), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 85%, light-dark(#000, #fff))); --diffs-fg: light-dark(#1a1a1a, #cdd6f4); --diffs-fg-number: light-dark(color-mix(in lab, light-dark(#1a1a1a, #cdd6f4) 65%, light-dark(#ffffff, #1e1e2e)), color-mix(in lab, light-dark(#1a1a1a, #cdd6f4) 65%, light-dark(#ffffff, #1e1e2e))); --diffs-fg-conflict-marker: light-dark(color-mix(in lab, light-dark(#1a1a1a, #cdd6f4) 65%, light-dark(#ffffff, #1e1e2e)), color-mix(in lab, light-dark(#1a1a1a, #cdd6f4) 65%, light-dark(#ffffff, #1e1e2e))); --diffs-deletion-base: #ff2c56; --diffs-addition-base: #32d74b; --diffs-modified-base: #6da7ec; --diffs-bg-deletion: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 88%, #ff2c56), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 80%, #ff2c56)); --diffs-bg-deletion-emphasis: light-dark(rgb(from #ff2c56 r g b / .15), rgb(from #ff2c56 r g b / .2)); --diffs-bg-addition: light-dark(color-mix(in lab, light-dark(#ffffff, #1e1e2e) 88%, #32d74b), color-mix(in lab, light-dark(#ffffff, #1e1e2e) 80%, #32d74b)); --diffs-bg-addition-emphasis: light-dark(rgb(from #32d74b r g b / .15), rgb(from #32d74b r g b / .2)); --diffs-selection-base: #6da7ec; --diffs-selection-number-fg: light-dark(color-mix(in lab, #6da7ec 65%, light-dark(#000, #fff)), color-mix(in lab, #6da7ec 75%, light-dark(#000, #fff))); background-color: rgb(30, 30, 46); color: rgb(205, 214, 244); display: block; --diffs-scrollbar-gutter-measured: 0px; --diffs-dark: #cdd6f4; --diffs-dark-bg: #1e1e2e; --diffs-dark-addition-color: #a6e3a1; --diffs-dark-deletion-color: #f38ba8; --diffs-dark-modified-color: #f9e2af; --diffs-light: #1a1a1a; --diffs-light-bg: #ffffff; --diffs-light-addition-color: #1e9e3c; --diffs-light-deletion-color: #ff3a30; --diffs-light-modified-color: #0073e6; box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; --lightningcss-light: ; --lightningcss-dark: initial;"><pre data-file="" data-disable-line-numbers="" data-overflow="wrap" style="box-sizing: border-box; isolation: isolate; font-family: anthropic-mono, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; outline: none; margin: 0px; padding: 8px 45.1999px 8px 17.1999px; display: block; background-color: rgb(30, 30, 46); --diffs-grid-number-column-width: minmax(min-content, max-content); --diffs-code-grid: minmax(min-content, max-content) 1fr; letter-spacing: calc(-1ch + round(up, 1ch, 0.015625px)); font-feature-settings: &quot;liga&quot;, &quot;clig&quot;, &quot;calt&quot;; --diffs-min-number-column-width-default: 1ch;"><code data-code="" style="box-sizing: border-box; isolation: isolate; font-family: anthropic-mono, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; outline: none; margin: 0px; padding: 4px 0px; display: grid; background-color: rgb(30, 30, 46); contain: content; grid-auto-flow: dense; grid-template-columns: minmax(min-content, max-content) 1fr; overflow: clip; overscroll-behavior-x: none; tab-size: 2; scrollbar-gutter: stable; align-self: flex-start; padding-block: 0px;"><div data-gutter="" style="box-sizing: border-box; grid-template-rows: subgrid; grid-template-columns: subgrid; z-index: 3; background-color: rgb(30, 30, 46); grid-area: span 2 / 1; display: grid; position: relative;"><div data-line-type="context" data-column-number="1" data-line-index="0" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div><div data-line-type="context" data-column-number="2" data-line-index="1" style="box-sizing: content-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: lab(59.817 2.11299 -14.0711); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 1ch; position: relative; text-align: right; user-select: none; padding: 0px; border-right: 0px; min-width: 0px;"></div></div><div data-content="" style="box-sizing: border-box; grid-template-rows: subgrid; grid-template-columns: subgrid; background-color: rgb(30, 30, 46); grid-area: span 2 / 2; min-width: 0px; display: grid;"><div data-line="1" data-line-type="context" data-line-index="0" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #999999; --diffs-token-light-font-style: italic; --diffs-token-dark: #9399B2; --diffs-token-dark-font-style: italic;">// DB pool metrics, e.g. in server.NewServerInstance after the DB is created</span></div><div data-line="2" data-line-type="context" data-line-index="1" style="box-sizing: border-box; --diffs-computed-decoration-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-diff-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-selected-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-editor-active-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-computed-hovered-line-bg: light-dark(#ffffff, #1e1e2e); --diffs-hover-mix-target: light-dark(#000, #fff); --diffs-line-bg: light-dark(#ffffff, #1e1e2e); color: rgb(205, 214, 244); background-color: rgb(30, 30, 46); --diffs-selection-mix-target: #6da7ec; --diffs-selection-emphasis-mix-target: #6da7ec; padding-inline: 0px; position: relative; white-space: pre-wrap; word-break: break-word; min-height: 1lh;"><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;">prometheus</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">.</span><span style="box-sizing: border-box; color: rgb(137, 180, 250); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(137, 180, 250); --diffs-token-light: #0073E6; --diffs-token-light-font-style: inherit; --diffs-token-dark: #89B4FA; --diffs-token-dark-font-style: italic;">MustRegister</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">(</span><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;">pgxpoolprometheus</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">.</span><span style="box-sizing: border-box; color: rgb(137, 180, 250); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(137, 180, 250); --diffs-token-light: #0073E6; --diffs-token-light-font-style: inherit; --diffs-token-dark: #89B4FA; --diffs-token-dark-font-style: italic;">NewCollector</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">(</span><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;">database</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">.</span><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;">Pool</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">,</span><span style="box-sizing: border-box; color: rgb(203, 166, 247); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(203, 166, 247); --diffs-token-light: #C5621B; --diffs-token-dark: #CBA6F7;"> map</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">[</span><span style="box-sizing: border-box; color: rgb(203, 166, 247); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(203, 166, 247); --diffs-token-light: #C5621B; --diffs-token-dark: #CBA6F7;">string</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">]</span><span style="box-sizing: border-box; color: rgb(203, 166, 247); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(203, 166, 247); --diffs-token-light: #C5621B; --diffs-token-dark: #CBA6F7;">string</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">{</span><span style="box-sizing: border-box; color: rgb(166, 227, 161); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(166, 227, 161); --diffs-token-light: #1E9E3C; --diffs-token-dark: #A6E3A1;">"db_name"</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">:</span><span style="box-sizing: border-box; color: rgb(205, 214, 244); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(205, 214, 244); --diffs-token-light: #1A1A1A; --diffs-token-dark: #CDD6F4;"> dbName</span><span style="box-sizing: border-box; color: rgb(147, 153, 178); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal; text-decoration: rgb(147, 153, 178); --diffs-token-light: #737373; --diffs-token-dark: #9399B2;">}))</span></div></div></code></pre></diffs-container></div><div class="pointer-events-none absolute inset-y-0 right-1.75 flex items-start overflow-y-clip pb-0.5" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px 0px 2px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: flex; pointer-events: none; position: absolute; inset-block: 0px; right: 7px; align-items: flex-start; overflow-y: clip;"><div class="pointer-events-auto sticky flex gap-0.75 top-[calc(max(var(--epitaxy-top-fade-height,0px),var(--fade-top,0px))+5px)] mt-1.25" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 5px 0px 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: flex; pointer-events: auto; position: sticky; top: 5px; gap: 3px;"></div></div></div></div><h3 style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-size: 15px; font-weight: 580; font-variation-settings: &quot;wght&quot; 540; letter-spacing: -0.01em; margin-block: 20px 6px; padding-block: 0px; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Rules of thumb</h3><ul style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px 0px 0px 20px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; list-style: outside; gap: 6px; flex-direction: column; display: flex; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial;">Never use song titles, IDs, tokens or IPs as label values, because each unique value creates a new time series. Put that detail in<span> </span><strong style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-weight: 500; --cds-font-axis-wght: &quot;wght&quot; 560,; font-variation-settings: &quot;GRAD&quot; 0, &quot;wght&quot; 560;">logs</strong><span> </span>instead; Loki already collects them.</li><li style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial;">Counters only go up (use<span> </span><code data-epitaxy-inline-code="" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-family: anthropic-mono, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; font-feature-settings: &quot;calt&quot; 0, &quot;liga&quot; 0; font-variation-settings: normal; font-size: 12px; font-variant-ligatures: none; background: none 0% 0% / auto repeat scroll padding-box border-box color(srgb 1 1 1 / 0.05); color: rgb(240, 239, 236); border-radius: 4px; padding-block: 1px; padding-inline: 2px; line-height: 1.4;">_total</code>). Gauges hold a current value.</li></ul><h3 style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-size: 15px; font-weight: 580; font-variation-settings: &quot;wght&quot; 540; letter-spacing: -0.01em; margin-block: 20px 6px; padding-block: 0px; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Acceptance criteria</h3><ul class="contains-task-list" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px 0px 16px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; list-style: none; gap: 6px; flex-direction: column; display: flex; color: rgb(240, 239, 236); font-family: ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, &quot;PingFang SC&quot;, &quot;PingFang TC&quot;, &quot;Hiragino Sans&quot;, &quot;Apple SD Gothic Neo&quot;, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 30, 46); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li class="flex items-start gap-1 decoration-1 [&amp;:has(&gt;[data-done])]:line-through [&amp;:has(&gt;[data-done])]:text-muted" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: flex; align-items: flex-start; gap: 4px; text-decoration-thickness: 1px;"><span class="shrink-0 size-[calc(1rem*var(--cds-rem-scale,1))] mt-[1px] flex items-center justify-center" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 1px 0px 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: flex; align-items: center; width: 16px; height: 16px; flex-shrink: 0; justify-content: center;"><span aria-hidden="true" class="block size-[calc(0.75rem*var(--cds-rem-scale,1))] rounded-full border border-alpha-3" style="box-sizing: border-box; border: 1px solid color(srgb 1 1 1 / 0.2); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: block; width: 12px; height: 12px; border-radius: 2.14748e+09px;"></span><span class="sr-only" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: -1px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; clip-path: inset(50%); white-space: nowrap; width: 1px; height: 1px; position: absolute; overflow: hidden;">not done</span></span><span class="flex-1 min-w-0" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; min-width: 0px; flex: 1 1 0%;">The chosen metrics appear on<span> </span><code data-epitaxy-inline-code="" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-family: anthropic-mono, ui-monospace, monospace, &quot;SF Mono&quot;, ui-monospace, Menlo, Consolas, monospace; font-feature-settings: &quot;calt&quot; 0, &quot;liga&quot; 0; font-variation-settings: normal; font-size: 12px; font-variant-ligatures: none; background: none 0% 0% / auto repeat scroll padding-box border-box color(srgb 1 1 1 / 0.05); color: rgb(240, 239, 236); border-radius: 4px; padding-block: 1px; padding-inline: 2px; line-height: 1.4;">/metrics</code><span> </span>with HELP text</span></li><li class="flex items-start gap-1 decoration-1 [&amp;:has(&gt;[data-done])]:line-through [&amp;:has(&gt;[data-done])]:text-muted" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: flex; align-items: flex-start; gap: 4px; text-decoration-thickness: 1px;"><span class="shrink-0 size-[calc(1rem*var(--cds-rem-scale,1))] mt-[1px] flex items-center justify-center" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 1px 0px 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: flex; align-items: center; width: 16px; height: 16px; flex-shrink: 0; justify-content: center;"><span aria-hidden="true" class="block size-[calc(0.75rem*var(--cds-rem-scale,1))] rounded-full border border-alpha-3" style="box-sizing: border-box; border: 1px solid color(srgb 1 1 1 / 0.2); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; display: block; width: 12px; height: 12px; border-radius: 2.14748e+09px;"></span><span class="sr-only" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: -1px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; clip-path: inset(50%); white-space: nowrap; width: 1px; height: 1px; position: absolute; overflow: hidden;">not done</span></span><span class="flex-1 min-w-0" style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; min-width: 0px; flex: 1 1 0%;">Panels added to the Grafana<span> </span><strong style="box-sizing: border-box; border: 0px solid color(srgb 1 1 1 / 0.1); margin: 0px; padding: 0px; outline-color: rgb(85, 152, 231); scrollbar-width: thin; app-region: initial; font-weight: 500; --cds-font-axis-wght: &quot;wght&quot; 560,; font-variation-settings: &quot;GRAD&quot; 0, &quot;wght&quot; 560;">MusicServer</strong><span> </span>dashboard (songs played/hour, library size, last sync age)</span></li></ul>
Sansan added the ops label 2026-10-15 21:56:22 +02:00
Sign in to join this conversation.