Rename Metric
Renames metrics flowing through a metrics pipeline. Operate on one metric at a time by its exact name, or rewrite a shared name prefix to rename many metrics at once.
Supported Telemetry
✓
Configuration

Operation
Enum: Name, Prefix
Yes
Name
The operation to perform when renaming a metric. Name renames a single metric by its exact name. Prefix rewrites a shared name prefix across every metric that starts with it.
Old Name
String
Yes
(empty)
The name of an incoming metric to rename. Shown when Operation is Name.
New Name
String
Yes
(empty)
The new name of the metric. Shown when Operation is Name.
Old Prefix
String
Yes
(empty)
The prefix of incoming metrics to rename. Shown when Operation is Prefix.
New Prefix
String
Yes
(empty)
The new prefix of the metrics. Shown when Operation is Prefix.
Old Name / New Name apply only to the Name operation; Old Prefix / New Prefix apply only to the Prefix operation. Each processor instance performs one rename. To rename several distinct metrics, add one instance per rename.
Examples
Rename a single metric
Operation is Name. The system.network.packets metric is renamed to network.traffic. Other metrics pass through untouched.
Rewrite a shared prefix across many metrics
Operation is Prefix. Every metric whose name starts with system. is renamed so the prefix becomes macos.. For example, system.cpu.time becomes macos.cpu.time and system.memory.usage becomes macos.memory.usage. The remainder of each metric name is preserved.
Rename several metrics with multiple instances
A single instance renames one metric or one prefix. To rename a set of distinct metrics, chain one Rename Metric instance per rename in the pipeline:
1
Name
system.network.packets
network.traffic
2
Name
system.cpu.load_average.1m
host.cpu.load.1m
3
Name
system.filesystem.usage
host.disk.usage
Configuration Tips
Namematches exactly. The value ofOld Namemust equal the incoming metric name in full. There is no wildcard or substring matching in theNameoperation.Prefixmatches the leading characters of the metric name and replaces only that leading segment. The rest of the name is left intact. Include the trailing separator (for examplesystem.rather thansystem) so partial-word collisions are avoided.A
Prefixrename affects every metric starting with the prefix. Confirm the prefix is specific enough that you do not rename metrics you intended to leave alone.
Troubleshooting
The metric was not renamed
Symptoms: the original metric name still appears downstream.
Solutions:
For the
Nameoperation, confirmOld Namematches the incoming metric name exactly, including case and the full dotted path.Confirm the metric actually reaches this processor. A filter or earlier processor in the pipeline may drop or rename it first.
Confirm the processor is on a metrics pipeline. This processor operates on metrics only.
Too many metrics were renamed
Symptoms: metrics you did not intend to change were also renamed.
Solutions:
The
Prefixoperation rewrites every metric starting withOld Prefix. Make the prefix more specific, and include the trailing separator (for examplesystem.) so it does not match unrelated names.Switch to the
Nameoperation if you intend to rename exactly one metric.
A downstream rename or dashboard broke
Symptoms: a later processor, exporter, or backend no longer finds the metric.
Solutions:
Renaming changes the metric name everywhere downstream. Update any later processors, routing rules, dashboards, or alerts that reference the old name.
If multiple Rename Metric instances are chained, remember each operates on the output of the previous one. Order them so each instance sees the name it expects.
Standalone Processor
Related Resources
Metrics Transform Processor — OpenTelemetry Collector Contrib, the upstream processor this resource configures.
Last updated
Was this helpful?