Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Datadog Engineering 20 min read Case study mediumAdept

Steganography at scale: Embedding share URLs in Datadog widget screenshots

Datadog 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.

Assumes: RGB color modelRedis cachingdevice pixel ratio

Related posts

  • How we built the Datadog heatmap to visualize distributions over time at arbitrary scale

    Datadog Engineering mediumAdept

    Datadog's heatmap visualizes DDSketch-backed distribution metrics over time, revealing multimodal behavior (such as pulsing benchmark traffic or health-check modes) that percentile lines hide. The frontend receives a constant-size payload of float32 bin counts with shared, explicitly stored bucket boundaries. Time buckets must align to the data's reporting interval to avoid aliasing. Because counts often follow power-law distributions, the color scale is a heuristic blend of linear and histogram-equalized (percentile) interpolation, so both a dominant narrow mode and faint secondary modes stay visible. Rendering switches to per-pixel canvas ImageData instead of per-bin fillRect above roughly 4 raw pixels per bin, and a coarser, size-relative grid drives mouse interactions and tooltips.

  • Application Metrics caught my broken size estimator

    Sentry mediumAdept

    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.

  • How Datadog uses Datadog to gain visibility into the Datadog user experience

    Datadog Engineering easyNovice

    Datadog's product designers used the company's own Real User Monitoring and Logs to make three data-backed UI decisions. They measured which monospace fonts users actually loaded, via the CSS Font Loading API, and then served Roboto Mono. They logged interactions with the DraggablePane component and found that almost no one used its minimize and maximize buttons, so those were replaced with a double-click on the handle. They also logged invalid custom time-frame inputs in DateRangePicker; adding support for patterns like "last 2 weeks" cut the parse error rate from about 10% to 5–6%.

  • Private Click Measurement: Conversion Fraud Prevention and Replacement For Tracking Pixels

    WebKit mediumAdept

    Private Click Measurement in iOS/iPadOS 15.4 and macOS Monterey 12.3 adds conversion fraud prevention, letting merchant sites sign unlinkable RSA blind-signature tokens. A merchant opts in by passing a 16-byte Base64URL `attributionDestinationNonce` on the trigger-attribution redirect and serving its public key at a well-known path. Merchants can also fire conversions through same-site pixels that redirect to `.well-known/private-click-measurement/trigger-attribution/` with an `attributionSource` parameter, so no third-party tracking pixel is needed. WebKit chose pixels over a JavaScript API so sites cannot detect whether PCM is enabled. Clicks inside cross-site iframes are now measurable, anchor WebIDL attributes are camelCased, and the token key encoding requirements are clarified.

  • Building text animations for Instagram Stories

    Meta Engineering mediumAdept

    Instagram's 2020 Stories text styles and animations required solving cross-platform font delivery and Unicode-aware rendering. On Android, bundling 4.5 MB of fonts would have cost an estimated 700K installs a month, and Google's Downloadable Fonts lacked some needed fonts, so the team built a generic font repository on Everstore, their Haystack-based blob store. A month-long crash hunt during A/B testing eventually traced to that trusted caching infrastructure failing to clean up files. Character-by-character reveals had to handle ligatures, emoji, RTL text and custom spans, which led the team to drop per-character Canvas#drawText for cached StaticLayouts, while iOS word reveals used NSLinguisticTagger for language-aware tokenization.

The quest for software engineering knowledge.

Look:
Layout: