Rename Attribute
The “Rename Attribute” Odigos Action can be used to rename attributes from logs, metrics, and traces. Different instrumentations might use different attribute names for similar information. This action let’s you to consolidate the names across your cluster.
Mechanism
The action will rename attributes from the following contexts:
- Resource attributes for spans, metrics and log records.
- Scope attributes for spans and metrics.
- Span attributes for spans.
- Span Events attributes for spans.
- Metric data point attributes for metrics.
- Log record attributes for logs.
The action will rename the specified attributes from all telemetry signals that are specified in the signals
field, regardless of the source, or any other condition.
Basic Example
The basic example below shows how to rename the deprecated net.peer.address
attribute to stable network.peer.address
in all telemetry signals.
Create a file named rename-net.action.yaml
with the following content:
Apply the action to the cluster:
Full Action Options
The full list of options available:
-
renames
(required): A map of strings, key representing the name of the attribute to rename and values the desired name. -
signals
(required): An array with the signals that the processor will act on (TRACES
,METRICS
,LOGS
). -
actionName
(optional): Allows you to attach a meaningful name to the action for convenience. Odigos does not use or assume any meaning from this field. -
notes
(optional): A free-form text field that allows you to attach notes to the action for convenience. Odigos does not use or assume any meaning from this field. -
disabled
(optional): A boolean field that allows you to disable the action. When set totrue
, the action will not be executed. The default value isfalse
.