Skip to content

Examples

Custom metrics from runs

Overview

Push pass rate metrics to observability backend post-run.

Examples use staging environments and synthetic identifiers. Replace project IDs, suite names, and webhook URLs with your organization values.

Prerequisites

  • Organization API key or authenticated CLI
  • Staging environment for safe experimentation

Step-by-step procedure

Prepare environment

Store ZOF_API_KEY in CI secrets or local env.

Confirm target project and suite IDs in Console.

Apply pattern

Copy example configuration into your pipeline or service.

Adjust environment names and notification channels.

Validate

Run once manually before enforcing gates.

Capture run ID in runbook for support reference.

Example implementation

pass_rate = run.summary.passed / run.summary.total
statsd.gauge("zof.pass_rate", pass_rate, tags=[f"project:{project_id}"])

Was this page helpful?