Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Cypress io Cypress Cloud Telemetry Recording

From Leeroopedia
Knowledge Sources
Domains Telemetry, Cloud
Last Updated 2026-02-12 00:00 GMT

Overview

An OpenTelemetry-based span export mechanism that transmits test execution telemetry to Cypress Cloud with optional encryption for secure data transfer.

Description

Cloud telemetry recording uses the OpenTelemetry standard (OTLP protocol) to export test execution spans to the Cypress Cloud API. Spans represent discrete operations (test execution, spec loading, browser launch) with timing and metadata. The system supports optional encryption for sensitive data: when enabled, spans are encrypted using a JWE (JSON Web Encryption) scheme before transmission.

The exporter handles a delayed export pattern: when encryption is configured, it buffers spans until the project ID and record key are attached, then flushes the buffer. This ensures no spans are sent without proper authentication.

Usage

Use this principle when recording test results to Cypress Cloud. It applies when --record is passed to cypress run and CYPRESS_RECORD_KEY is set.

Theoretical Basis

Telemetry Export Pipeline:
  Test execution → OpenTelemetry spans → BatchSpanProcessor
    → OTLPTraceExporter
      a. If encryption enabled and credentials unknown → buffer spans
      b. If credentials attached → flush buffer + export
      c. If no encryption → export directly via OTLP HTTP

Encryption Flow:
  1. Receive spans from BatchSpanProcessor
  2. Serialize to OTLP format
  3. Encrypt with enc.encrypt({ body, url }) → JWE
  4. Send JWE to Cloud API with x-cypress-encrypted: 1 header

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment