SensobitDocs

RUM ingest

Capture page-load and Web Vital metrics from browsers and WebViews.

Real User Monitoring (RUM) records page performance as users experience it. Post events to the APM API on api.sensobit.com, not the ingest host.

Endpoint

POST https://api.sensobit.com/api/v1/apm/rum

curl -X POST https://api.sensobit.com/api/v1/apm/rum \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "X-Namespace-ID: YOUR_NAMESPACE_ID" \
  -d '{
    "page_url": "https://app.example.com/checkout",
    "page_title": "Checkout",
    "load_time_ms": 1840,
    "dom_content_loaded_ms": 920,
    "first_contentful_paint_ms": 640,
    "largest_contentful_paint_ms": 1510,
    "time_to_interactive_ms": 2100,
    "cumulative_layout_shift": 0.04,
    "first_input_delay_ms": 18,
    "total_blocking_time_ms": 90,
    "session_id": "sess_01",
    "device_type": "desktop",
    "browser": "Chrome",
    "os": "Linux",
    "country": "IN",
    "viewport_width": 1440,
    "viewport_height": 900,
    "connection_type": "4g",
    "tags": { "app": "web" }
  }'

page_url is required. Namespace is taken from the authenticated key, X-Namespace-ID, or the session.

Browser snippet

<script>
  window.addEventListener('load', function () {
    const nav = performance.getEntriesByType('navigation')[0];
    fetch('https://api.sensobit.com/api/v1/apm/rum', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-API-Key': 'YOUR_PUBLIC_RUM_KEY',
      },
      body: JSON.stringify({
        page_url: location.href,
        page_title: document.title,
        load_time_ms: nav && nav.loadEventEnd,
        dom_content_loaded_ms: nav && nav.domContentLoadedEventEnd,
        device_type: /Mobi/.test(navigator.userAgent) ? 'mobile' : 'desktop',
        browser: navigator.userAgent,
        os: navigator.platform,
      }),
    });
  });
</script>

Issue a dedicated RUM key with a tight namespace and rotate it if it leaks from client-side code.

Read RUM

  • Console: APM → RUM charts (LCP, CLS, FID, load time by page, browser, and country)
  • API: GET https://api.sensobit.com/api/v1/apm/rum

The Flutter mobile and desktop apps can also emit RUM-style timings from WebViews using the same payload.

On this page