How to Migrate IOSM Metric Schemas Safely
A metric can keep its name while becoming a different measurement.
Change the collector, rename an attribute, alter an aggregation window, or redefine which files belong to the subject—and yesterday's 0.72 may no longer be comparable with today's 0.74. The arithmetic still works. The claim does not.
IOSM already treats metrics as evidence rather than decoration. Its specification requires declared normalization targets, all six canonical metrics, confidence per metric, raw measurements, and Metrics History. It also says targets must not be loosened without human approval and a Decision Log entry. I think the next operational step is unavoidable: metric semantics need versioned migrations, just like data schemas do.
The hidden breaking change
A metric is not only a number and a name. It has a contract:
| Dimension | Example |
|---|---|
| subject | auth-service at one repository revision |
| population | production requests excluding health checks |
| unit | milliseconds |
| aggregation | p95 |
| window | rolling 24 hours |
| collector | latency-exporter@3.4.1 |
| normalization | 1 - min(p95 / 500, 1) |
| semantic version | performance.http_latency@2.1.0 |
If any load-bearing dimension changes, the metric schema changes. Some changes are compatible: a field may be renamed while preserving meaning. Others are not: moving from p95 to average latency, adding synthetic traffic, or changing the normalization target produces a different claim.
This is narrower than the baseline comparability manifest. That manifest asks whether two observations are valid operands. A migration receipt explains how a known semantic change crosses the boundary—or records that it cannot.
Three migration classes
I would make the decision explicit with three classes.
1. Identity
The representation changes, but the observation means the same thing. A collector field moves from service.name to service.name.v2; a deterministic rename can translate old records without changing values.
The receipt records the source schema, target schema, transformation, and a conformance fixture. Historical continuity remains valid after translation.
2. Recomputable
The stored raw evidence is rich enough to calculate the new definition. For example, individual request durations exist, so p95 can be recomputed after the health-check filter changes.
This is not an in-place edit. The runtime should derive a new series, preserve the old one, record the transformation code and input hashes, then compare a bounded overlap window. The old claim remains addressable; the new claim gains its own lineage.
3. Non-convertible
The old evidence cannot support the new semantics. A daily average cannot be transformed into p95. A repository-wide complexity score cannot be split reliably into a service score if the raw per-file observations were discarded.
Here the honest operation is not interpolation. It is a baseline reset. The migration receipt closes the old series, opens a new lineage, and blocks cross-boundary deltas.
migration_id: metric-migration-2026-07-28-01
metric_id: performance.http_latency
from_schema: 2.1.0
to_schema: 3.0.0
class: non_convertible
reason: "aggregation changed from mean to p95; raw samples unavailable"
old_series_closed_at: 2026-07-27T23:59:59Z
new_baseline_required: true
approved_by: platform-owner
artifacts:
decision: .iosm/decision-log.md#D-184
new_baseline: .iosm/cycles/2026-07-28-001/baseline-report.json
The migration gate
A version string alone does not protect anything. The runtime needs a gate before it calculates a delta or IOSM-Index.
same schema?
yes -> compare
no -> migration receipt exists?
no -> UNKNOWN
yes -> identity/recomputable transform verified?
yes -> compare translated series
no -> require new baseline
For identity and recomputable migrations, I would require three checks:
- Transformation determinism — the same source artifact and migration version produce the same target artifact.
- Conformance fixtures — representative records demonstrate renamed, removed, defaulted, and rejected fields.
- No silent loss — every discarded field or record is declared, with its effect on the metric bounded.
For non_convertible, the gate must reject any delta that spans the boundary. Both values may be valid. They simply do not belong in the same subtraction.
This follows the same principle behind IOSM's rule that a missing metric must not become zero: unknown is a control state, not empty space available for convenient arithmetic.
Why immutability matters
OpenTelemetry's telemetry-schema model provides a useful external precedent. Schemas are versioned, published schema files are immutable, sources attach a schema URL, and transformations describe supported conversions between versions. When conversion is impossible, the change is breaking.
IOSM does not need to copy that system wholesale. Telemetry and engineering-health metrics have different scopes. But the architectural lesson transfers cleanly: producers, historical records, and consumers evolve at different speeds, so meaning must travel with the data.
That gives Metrics History a stronger shape:
{
"metric_id": "performance.http_latency",
"schema": "https://example.org/iosm/metrics/performance.http_latency/3.0.0",
"value": 0.74,
"raw_evidence": "sha256:...",
"collector": "latency-exporter@4.0.0",
"migration_lineage": ["metric-migration-2026-07-28-01"]
}
A dashboard may still draw two line segments. It must not draw one continuous trend and imply evidence that does not exist.
Threshold changes are migrations too
Teams often treat a threshold edit as configuration, not semantics. In a normalized metric, that distinction is false.
If performance is calculated as 1 - min(p95 / target, 1), changing the target from 500 ms to 300 ms changes every normalized value. IOSM correctly requires approved target changes. A migration receipt adds the missing operational choice:
- recompute the historical series from preserved raw evidence under the new target;
- retain the old series and begin a new baseline;
- or present both, clearly labeled, without subtracting across definitions.
The choice depends on evidence availability, not on which chart looks better.
What this mechanism does not prove
A valid migration proves continuity of representation or declares its absence. It does not prove that the metric is useful, that the collector is unbiased, or that the target reflects a business outcome. Those remain separate review questions.
Nor should every implementation detail trigger a major migration. A collector patch that changes no output semantics may keep the metric schema version while still recording collector provenance. The boundary is semantic: would a reasonable consumer interpret the resulting number differently?
My rule is simple: if metric meaning changes, history must either migrate with proof or stop at a new baseline.
Engineering history should be durable, but never fictional. IOSM becomes more trustworthy when it can say not only what changed in the system, but when the language of measurement itself changed.