> 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/coalesce.md).

# Coalesce

### Description

The Coalesce processor can be used to consolidate many field names into a single field name.

### Use

The Coalesce processor is utilized for consolidating telemetry fields in metrics, logs, and traces based on specified conditions.

{% hint style="info" %}
**NOTE**

While this is similar on concept to SQL Coalesce, it has some key differences. Especially around the order of precedence. See the behavior section.
{% endhint %}

### Supported Types

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

### Configuration

<table><thead><tr><th width="156.99609375">Field</th><th>Description</th></tr></thead><tbody><tr><td>Telemetry Types</td><td>The types of telemetry to apply the processor to.</td></tr><tr><td>Condition</td><td>A condition that determines when this processor is applied.</td></tr><tr><td>Action</td><td>The action to take (insert, update, upsert) when coalescing telemetry</td></tr><tr><td>Coalesce From</td><td>The telemetry fields to coalesce from.</td></tr><tr><td>Coalesce To</td><td>The telemetry field to coalesce to.</td></tr></tbody></table>

### Behavior

The behavior of this processor is dependent on the selected action.

* When insert is selected, the target field only gets coalesced to if it doesn't exist.
  * Precedence: First item in list.
* When update is selected, the target field gets coalesced to only if it already exists.
  * Precedence: Last item in list.
* When upsert it selected, the target field gets coalesces to regardless whether it existed or not.
  * Precedence: Last item in list.

### Example Configuration(s)

#### Coalesce timestamp fields

This configuration will coalesce the body fields `ts`, `time`, and `timestamp` to an attribute named `time` for later parsing. Upsert is used for the action.

**Web Interface**

<figure><img src="/files/7TiWyjYcP7ZLzz1qcv7y" alt="Bindplane docs - Coalesce - image 1"><figcaption></figcaption></figure>

#### Coalesce severity fields

This configuration will coalesce the body fields `sev`, `severity`, and `level` to an attribute named `severity` for later parsing. Upsert is used for the action.

**Web Interface**

<figure><img src="/files/1Wgh85e4NSExFhXj6eqA" alt="Bindplane docs - Coalesce - image 2"><figcaption></figcaption></figure>

#### Coalesce datacenter fields

This configuration will coalesce the body fields `dc`, `datacenter`, and `location` to an attribute named `datacenter` for later parsing. Upsert is used for the action.

**Web Interface**

<figure><img src="/files/T0jfNfnqrIDPTTvDIFQj" alt="Bindplane docs - Coalesce - image 3"><figcaption></figcaption></figure>


---

# 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/coalesce.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.
