Skip to content

Add Magento SSR Observability Module #11

@digitalrisedorset

Description

@digitalrisedorset

Summary

Introduce a lightweight Magento observability module to capture SSR fragment lifecycle events and validate cache behaviour.

Motivation

SSR Fragment Cache introduces multiple execution paths:

Cache Hit
↓
Return Cached HTML

and

Cache Miss
↓
Generate SSR
↓
Store Fragment
↓
Return HTML

Without observability it becomes difficult to determine:

  • Whether cache entries are being used
  • Cache hit ratio
  • SSR generation frequency
  • Cache invalidation behaviour
  • End-to-end SSR performance

Proposed Events

Cache Hit

ssr.cache.hit

Attributes:

widget
cache_key
fragment_size

Cache Miss

ssr.cache.miss

Attributes:

widget
cache_key

SSR Generation Started

ssr.generate.started

Attributes:

widget
cache_key

SSR Generation Completed

ssr.generate.completed

Attributes:

widget
cache_key
duration_ms
fragment_size

Cache Stored

ssr.cache.store

Attributes:

widget
cache_key
ttl
fragment_size

Expected Outcome

Enable validation of the complete SSR fragment journey through telemetry and provide visibility into cache effectiveness before wider rollout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions