> 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/group-by-attributes.md).

# Group by Attributes

| Metrics | Logs | Traces | Bindplane Collector |
| ------- | ---- | ------ | ------------------- |
| ✓       | ✓    | ✓      | `v1.0.0+`           |

### Description

The Group by Attributes Processor groups telemetry with shared attribute values into the same resource.

### Use

1. "Promote" attributes so telemetry with those attributes gets grouped under a *resource* of that value.
2. [Compact](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/groupbyattrsprocessor#compaction) telemetry data that shares a resource after batching.

### Configuration

<table><thead><tr><th width="156.08984375">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>Attribute Keys</td><td>The attribute keys to group by and move to the resource. When no keys are specified, resources with the same attributes are compacted into the one resource.</td></tr></tbody></table>

### Example Configurations

#### 1. Promote an attribute

An example of promoting the `user` attribute on logs:

<figure><img src="/files/ooROOGDFCpNxPo2wQIcC" alt="Bindplane docs - Group by Attributes - image 1"><figcaption></figcaption></figure>

#### Before processor:

<figure><img src="/files/BgCVaesdNhryEmNH1O2W" alt="Bindplane docs - Group by Attributes - image 2"><figcaption></figcaption></figure>

#### After:

<figure><img src="/files/TxBT9yDynpJmNxYzvhBk" alt="Bindplane docs - Group by Attributes - image 3"><figcaption></figcaption></figure>

#### 2. Compact telemetry with the same resource

By default, the processor will [compact](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/groupbyattrsprocessor#compaction) telemetry that shares the same resource. Using this processor after the batch processor can reduce the amount of data sent to some destinations.

<figure><img src="/files/IzyBNuk7DbASFCKuhD4u" alt="Bindplane docs - Group by Attributes - image 4"><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/group-by-attributes.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.
