<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Prometheus | Akbar Goldoust | Senior Full-Stack Software Engineer</title><link>https://www.goldoust.de/tags/prometheus/</link><atom:link href="https://www.goldoust.de/tags/prometheus/index.xml" rel="self" type="application/rss+xml"/><description>Prometheus</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Fri, 27 Nov 2026 00:00:00 +0000</lastBuildDate><image><url>https://www.goldoust.de/media/sharing.png</url><title>Prometheus</title><link>https://www.goldoust.de/tags/prometheus/</link></image><item><title>Inventory Platform: Go API with monitoring</title><link>https://www.goldoust.de/work/inventory-platform/</link><pubDate>Fri, 27 Nov 2026 00:00:00 +0000</pubDate><guid>https://www.goldoust.de/work/inventory-platform/</guid><description>&lt;h2 id="what-it-is"&gt;What it is&lt;/h2&gt;
&lt;p&gt;A small product and stock tracker that I built to show a complete, observable backend in one repository. The code is public on
, and &lt;code&gt;docker compose up&lt;/code&gt; starts the whole stack.&lt;/p&gt;
&lt;div class="mermaid"&gt;flowchart LR
user([Browser]) --&gt; nginx["nginx&lt;br/&gt;Vue 3 + TypeScript app"]
nginx --&gt;|"/api/*"| api["Go API&lt;br/&gt;net/http + pgx"]
api --&gt; db[("PostgreSQL 16")]
migrate["migrate (runs once)"] --&gt; db
prom["Prometheus"] --&gt;|"scrapes /metrics"| api
grafana["Grafana"] --&gt; prom
&lt;/div&gt;
&lt;h2 id="details-worth-a-look"&gt;Details worth a look&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stock can never go below zero.&lt;/strong&gt; Every stock change runs in one transaction that also writes a row to &lt;code&gt;stock_movements&lt;/code&gt;, and a database constraint rejects overselling. The API answers with HTTP 409 instead.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Metrics per route&lt;/strong&gt;: request count, latency histogram and stock changes, labelled by route pattern so each product id does not create its own series.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A/B test&lt;/strong&gt;: each browser gets a table or a card layout through a cookie, and every request carries its variant, so Grafana can compare the two.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tests and migrations&lt;/strong&gt;: &lt;code&gt;go test&lt;/code&gt; for the API, SQL migrations with golang-migrate.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="stack"&gt;Stack&lt;/h2&gt;
&lt;p&gt;Go, pgx, PostgreSQL 16, Vue 3, TypeScript, Vite, nginx, Docker Compose, Prometheus, Grafana.&lt;/p&gt;</description></item></channel></rss>