惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
GbyAI
GbyAI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
量子位
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
CERT Recently Published Vulnerability Notes
Recent Announcements
Recent Announcements
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
P
Privacy International News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
博客园 - 叶小钗
L
Lohrmann on Cybersecurity
G
GRAHAM CLULEY
T
The Exploit Database - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
P
Proofpoint News Feed
NISL@THU
NISL@THU
博客园 - Franky
C
Cybersecurity and Infrastructure Security Agency CISA
The Register - Security
The Register - Security
M
MIT News - Artificial intelligence
Know Your Adversary
Know Your Adversary
A
Arctic Wolf
F
Full Disclosure
T
Threat Research - Cisco Blogs
P
Privacy & Cybersecurity Law Blog
The Hacker News
The Hacker News
博客园 - 【当耐特】
D
Docker
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Jina AI
Jina AI
Help Net Security
Help Net Security
V
Visual Studio Blog
小众软件
小众软件
B
Blog
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
Forbes - Security
Forbes - Security
N
Netflix TechBlog - Medium
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
The 114KB Span Attribute That Hid Our LCP Data
FrankFan · 2026-05-22 · via DEV Community

A React Native WebView debugging story about LCP, data URLs, and trace attributes

We recently ran into a strange Sentry performance issue in a React Native app.

The short version:

Our LCP transaction existed in Sentry, but we could not query it by the attributes we attached to it.

That sounded contradictory at first. If the transaction was there, why could not Trace Explorer find it?

The answer turned out to be a single span attribute:

lcpUrl = data:image/png;base64,...

Enter fullscreen mode Exit fullscreen mode

In one iOS event, that value was about 114KB before Sentry normalized it.

The symptom

We were measuring WebView performance inside a React Native app. For each WebView page load, we reported two custom Sentry transactions:

Online Customer Support (FCP)
Online Customer Support (LCP)

Enter fullscreen mode Exit fullscreen mode

Both transactions used the same operation:

ui.web_page_load

Enter fullscreen mode Exit fullscreen mode

And we attached searchable attributes such as:

metricInfo = FCP | LCP
pageTitle
pageUrl
host
path
durationMs

Enter fullscreen mode Exit fullscreen mode

In Sentry Transaction Summary, the LCP transaction was visible. We could open sampled events and see slow LCP data for the page.

But in Trace Explorer, this query returned no iOS LCP rows:

span.op:ui.web_page_load metricInfo:LCP os.name:iOS pageTitle:"Online Customer Support"

Enter fullscreen mode Exit fullscreen mode

FCP worked. Android worked. iOS LCP did not.

That is the kind of bug that makes you distrust the dashboard before you distrust your own instrumentation.

What we found in the raw event

When we pulled the raw event from the Sentry API, the iOS LCP transaction existed. The transaction name was correct:

Online Customer Support (LCP)

Enter fullscreen mode Exit fullscreen mode

But the trace data was not what we expected. The event still had fields like:

durationMs
host
lcpElement
lcpUrl

Enter fullscreen mode Exit fullscreen mode

But important fields we expected to query by were missing from the indexed span data:

metricInfo
pageTitle
pageUrl
path

Enter fullscreen mode Exit fullscreen mode

The suspicious field was lcpUrl.

For that iOS LCP event, lcpUrl was not a normal network URL. It was a base64 data URL:

data:image/png;base64,...

Enter fullscreen mode Exit fullscreen mode

Sentry showed the value as truncated, and the event metadata indicated the original value was much larger. In our case, the original attribute value was around 114KB.

The production difference: iOS sent 114KB, Android sent 100 characters

This was the detail that made the investigation click.

In production, the same WebView LCP instrumentation behaved very differently across platforms:

Field iOS Android
lcpUrl original length 114,130 chars 100 chars
Sentry _meta Saved as 7,683 chars with !limit Complete
metricInfo Missing Present
pageTitle Missing Present
pageUrl Missing Present

The iOS LCP transaction was real, but it carried an enormous lcpUrl value. Sentry normalized the oversized field, and the attributes we depended on for aggregation were not available in Explore.

That explains the contradiction:

  • Transaction Summary could still find the event by transaction name.
  • Explore could not find it by attributes like metricInfo, pageTitle, or path.

Android looked fine because its entry.url value was already short before we sent it to Sentry.

Why Android looked fine

We built a small WebView test page to isolate where the truncation happened.

The test page generated a real 800x500 PNG, embedded it as a base64 data URI, and made it the LCP candidate. The full data URI was 1,601,014 characters.

On Android, the results were:

DOM img.src.length              = 1,601,014
AndroidBridge.postLcpUrl(url)   = 1,601,014
PerformanceObserver entry.url   = 100

Enter fullscreen mode Exit fullscreen mode

That told us the React Native bridge was not truncating the value. A normal JavaScript-to-Android bridge could receive the full 1.6MB string.

The 100-character value came from PerformanceObserver / Chromium before our injected script sent anything to React Native.

On iOS Safari WebView, entry.url kept the full data URI. That is closer to the literal resource URL, but in this case it was exactly what made the telemetry event dangerous.

The platform chain looked like this:

iOS Safari WebView
  PerformanceObserver -> entry.url = full base64 URI
    -> postMessage to React Native
      -> Sentry span attribute
        -> oversized field normalized
          -> aggregation attributes missing in Explore

Android Chromium WebView
  PerformanceObserver -> entry.url = 100 characters
    -> Sentry span attributes stay small
      -> dashboard query works

Enter fullscreen mode Exit fullscreen mode

We also found Chromium source paths that use a 100-character URL elision pattern for internal presentation/logging-style output. I would treat this as an implementation detail, not a Web API contract. It explained our production data, but it is not something application logic should depend on.

Why did LCP have a data URL?

The browser Largest Contentful Paint API can expose information about the element that became the LCP candidate. Depending on the content, the entry may include a URL-like value for the resource.

In a WebView, the largest contentful element can be an image. If that image is embedded as a data URL, the value can become:

data:image/png;base64,<a very long string>

Enter fullscreen mode Exit fullscreen mode

Our injected WebView script collected that value and forwarded it to React Native. React Native then attached it as a Sentry span attribute.

That was the mistake.

We did not actually need the image bytes. We only wanted to measure page performance by page title, host, path, metric type, and duration.

The fix

We removed lcpUrl and lcpElement from the Sentry span attributes.

Before, our LCP payload included extra diagnostic details:

reportWebSpan("LCP", lcpValue, {
  lcpElement,
  lcpUrl,
});

Enter fullscreen mode Exit fullscreen mode

After the fix, we only report the metric value and stable dimensions:

reportWebSpan("LCP", lcpValue);

Enter fullscreen mode Exit fullscreen mode

The Sentry attributes now stay small and useful:

metricInfo
pageTitle
pageUrl
host
path
durationMs

Enter fullscreen mode Exit fullscreen mode

After removing the oversized fields, the LCP data appeared correctly in the query again.

What I should have caught earlier

This bug came from a well-intentioned bit of instrumentation code. It tried to capture more context for LCP debugging. That sounds reasonable when you are writing the code.

But observability data has different rules from application data.

A field is not harmless just because it is technically available. Before sending it to a telemetry system, it should pass a few checks:

  • Is it bounded in size?
  • Is it low-cardinality enough to query and aggregate?
  • Does it help answer a real production question?
  • Could it contain private or user-specific data?
  • Could one bad value make the rest of the event harder to index or search?

lcpUrl failed those checks.

lcpElement was also not needed for our dashboard. It added noisy DOM details without improving the metrics we actually used.

One more small trap: our performance transactions were sampled. With tracesSampleRate: 0.2, historical examples were naturally sparse. That made the bug feel more mysterious than it was.

Lessons learned

For custom performance instrumentation, especially in WebViews, keep span attributes boring.

Good attributes are small, stable, and useful for grouping:

metricInfo = LCP
pageTitle = Online Customer Support
host = example.com
path = /customer-service
durationMs = 3020

Enter fullscreen mode Exit fullscreen mode

Bad attributes are large, unique, or accidentally full of payload data:

lcpUrl = data:image/png;base64,...
outerHTML = <huge DOM subtree>
requestBody = ...

Enter fullscreen mode Exit fullscreen mode

My final notes from this one:

  1. entry.url is not equally useful across WebViews. Android Chromium may give you a short, elided value, while iOS Safari WebView may give you the full data URI.
  2. Sentry span attributes should not contain potentially huge strings.
  3. A platform that silently truncates a dangerous value can hide a bug in your instrumentation.
  4. Spec-like behavior is not always operationally safe. Returning the full URL may be correct, but sending it to telemetry was still wrong.

The dashboard was not wrong. The data model was wrong.

And in this case, deleting two fields made the metric visible again.