Application Metrics caught my broken size estimator
Instrumenting Cliparr Convert, an in-browser video converter built on MediaBunny/WebCodecs, with Sentry Application Metrics exposed an AI-written size estimator that scaled source size by resolution and produced files up to 83% larger than predicted. Replacing it with a plain bitrate × duration formula brought most transcodes within about 5%. Recording the actual/estimated size ratio as a distribution tagged by estimator basis, format and quality also showed that copy mode over-estimates by about 16% and GIFs by about 9%. Counters cover the conversion and PWA install funnels, and metrics are preferred over traces or logs because they are unsampled and explicitly mark a KPI.
Related posts
- Level Up With Derived Columns: Understanding Screen Size (With Basic Arithmetic)
Honeycomb mediumAdeptHoneycomb's derived columns can compute values at query time instead of sending redundant fields from instrumentation, for example multiplying window height and width into a pixel area with MUL. Dividing window area by screen area with DIV gives a screen_used ratio. Heatmaps of that ratio show most users already fill nearly all of their screen, with almost nothing above 0.95, which suggests browser chrome takes about 5% and argues against enlarging the UI. Other uses include normalizing seconds to milliseconds and SUMming page-load phase timings, which keeps instrumentation DRY.
- Steganography at scale: Embedding share URLs in Datadog widget screenshots
Datadog Engineering mediumAdeptDatadog embeds an 8-byte snapshot ID invisibly into the 1 px border of every dashboard widget so screenshots can be resolved back to the full widget context (queries, time range, template variables), with definitions cached in Redis for one hour keyed by org ID plus widget ID. A first scheme packing a byte per pixel via RGB offsets broke under display color-profile conversion (e.g., DCI-P3 shifting channels by ±1) and was sometimes visible. The final design uses fuzzy encoding: ±3 offsets on red and green carry 2 bits per pixel, decoded within tolerance ranges, with blue-shifted sentinel pixels marking a 34-pixel watermark. The system also handles device pixel ratios and copy-paste workflows, and renders over a billion watermarks per day with an estimated ~1 in 37 million collision probability.
- Measuring the back/forward cache with Application Metrics
Sentry mediumAdeptSentry's new opt-in bfcacheMetricsIntegration (JavaScript SDK v11) turns the browser's back/forward cache decisions into application metrics, closing a blind spot where cache hits leave no page-load telemetry. Built on the pageshow event and the notRestoredReasons API, it emits three metrics: a hit/miss counter per back/forward navigation, a Chromium-only counter of not-restored reasons with the frame that caused them (e.g. unload listeners, websockets, Cache-Control: no-store), and a distribution of fallback reload duration that measures what each miss cost the user. Because eligibility can regress without code changes, the recommendation is to track hit rate continuously and break misses down by route, release and browser.
- Reducing Android scope-sync overhead in Sentry Flutter
Sentry mediumAdeptSentry's Flutter SDK cut Android scope-update processing time by 27–30% by removing duplicate normalization and encoding JSON directly to UTF-8 bytes. Scope data was being normalized on both the calling isolate and the worker isolate, so normalizing once halved that step (e.g. 2.71 ms to 1.35 ms for 238 KB). Replacing jsonEncode plus utf8.encode plus a Uint8List copy with JsonUtf8Encoder saved 16% of encoding time, while removing the buffer copy alone saved only about 2%. Pixel 4 benchmarks show savings of about 11 µs per small breadcrumb and 2.29 ms for 238 KB payloads, and the changes ship in sentry_flutter 9.26.0.
- Shifting Metrics Right
Honeycomb mediumAdeptInstead of pre-aggregating metrics inside applications, generate them as late as responsibly possible in the telemetry pipeline, either in the OpenTelemetry Collector or in the backend from traces and logs. The argument separates measurements (questions you want answered) from metrics (a pre-aggregated storage type). It claims the accuracy loss from sampling is negligible: one customer's sampled, trace-derived metrics were within 0.001% of their pre-aggregated data at a fraction of the cost. In-app aggregation buffers data for 10 to 60 seconds and can silently lose datapoints on a crash. A signaltometrics connector config shows how to derive HTTP semantic-convention exponential histograms from spans using AdjustedCount to account for sampling.