---
search:
  exclude: true
---

# <a id="bitdrift.public.unary.workflows.v1.GroupBy"></a>GroupBy

| Field | Type | Description |
|---|---|---|
| values | <span class="proto-type proto-type-message">repeated [<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">GroupBy</i><i class="proto-type-dot">.</i><i class="proto-type-part">Value</i>](#bitdrift.public.unary.workflows.v1.GroupBy.Value){ title="bitdrift.public.unary.workflows.v1.GroupBy.Value"}</span> | Values to group by. This generates additional dimensions for the generated insights and allows for more granular filtering in dashboards. For example, if you have a metric of error count with a group by value of error type, the collected metrics will include an error type dimension. |

#### Example
```json
{
  "values": [
    {
      "log_body": false
    }
  ]
}
```

# <a id="bitdrift.public.unary.workflows.v1.GroupBy.StateValue"></a>GroupBy.StateValue

| Field | Type | Description |
|---|---|---|
| scope | <span class="proto-type proto-type-enum">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">StateScope</i>](bitdrift_public_unary_workflows_v1_StateScope.md#bitdrift.public.unary.workflows.v1.StateScope){ title="bitdrift.public.unary.workflows.v1.StateScope"}</span> | The scope of the state value. See `StateScope` for more details about what the different scopes are available. |
| key | <span class="proto-type proto-type-primitive">string</span> | The key of the state value. This is used to look up the value in the state map based on the provided scope. |

#### Example
```json
{
  "key": "example-key",
  "scope": "GLOBAL_STATE"
}
```

# <a id="bitdrift.public.unary.workflows.v1.GroupBy.Value"></a>GroupBy.Value

A Value to group by. This specifies what additional dimension is included based on extracting additional state from the log that triggers the rule. Each possible values indicates the source the the data used for the dimension. See individual fields for more details.

| Field | Type | Description |
|---|---|---|
| field_key | <span class="proto-type proto-type-primitive">string</span> | Setting this instructs the engine to look up the value of the field by the given name in the log that triggered the rule and use that as a dimension for the generated metric. The field key becomes the resulting metric dimension name.<br><br>(Only one of <em>field_key</em>, or <em>log_body</em>, <em>state_value</em> can be set) |
| log_body | <span class="proto-type proto-type-primitive">bool</span> | Setting this instructs the engine to use the log body as a dimension for the generated metric.<br><br>(Only one of <em>log_body</em>, or <em>field_key</em>, <em>state_value</em> can be set) |
| state_value | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">workflows</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">GroupBy</i><i class="proto-type-dot">.</i><i class="proto-type-part">StateValue</i>](#bitdrift.public.unary.workflows.v1.GroupBy.StateValue){ title="bitdrift.public.unary.workflows.v1.GroupBy.StateValue"}</span> | Setting this instructs the engine to read a value out of the state map based on the provided scope and key and use that as a dimension for the generated metric. The key becomes the resulting metric dimension name.<br><br>(Only one of <em>state_value</em>, or <em>field_key</em>, <em>log_body</em> can be set) |

#### Example
```json
{
  "log_body": false
}
```

