> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/integrations/processors/rename-fields.md).

# Rename Fields

### Description

The Rename Fields processor can be used to rename resource, attribute, and log body fields.

### Supported Types

| Metrics | Logs | Traces |
| ------- | ---- | ------ |
| ✓       | ✓    | ✓      |

### Configuration Table

| Parameter        | Type                | Default                         | Description                                                                                                                                           |
| ---------------- | ------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| telemetry\_types | `telemetrySelector` | `["Logs", "Metrics", "Traces"]` | The list of telemetry types the processor will act on.                                                                                                |
| Condition        | `string`            | `true`                          | An OTTL condition that must evaluate to true to apply this processor. By default, the processor applies to all telemetry.                             |
| Field Type       | `string`            | `attributes`                    | Determines whether the field is renamed in the body, attributes, or resource fields of the telemetry. Note: Body fields are applicable only for logs. |
| Old Name         | `string`            | `""`                            | Specifies the existing field in the telemetry that the processor will rename.                                                                         |
| New Name         | `string`            | `""`                            | Indicates the new field name that will replace the old field name in the telemetry data.                                                              |

### Example Configuration

#### Renaming log body fields

In this example, we rename the `status` field in a log body to `status_code`. Since this change only applies to logs, we have disabled metrics and traces for this processor.

**Web Interface**

**Standalone Processor**

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: rename_fields_v2
  name: rename_fields_v2
spec:
  type: rename_fields_v2
  parameters:
    - name: telemetry_types
      value: ['Logs']
    - name: condition
      value: 'true'
    - name: fields
      value:
        - fieldType: body
          key: status
          value: status_code
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bindplane.com/integrations/processors/rename-fields.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
