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

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/workflow.proto#L20-L56`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/workflow.proto#L20-L56>)

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| values | <span class="proto-type proto-type-message">array of [<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 "bitdrift.public.unary.workflows.v1.GroupBy.Value")</span><br><em class="proto-field-annotation">up to 100 items</em> | Dimensions to collect for each emitted metric. Each entry adds one or more dimensions. For  example, grouping an error-count time series by `error_type` makes that error type value  available alongside the charted metric data. |

</section>
<p class="h4">Example</p>
```json
{
  "values": [
    {
      "log_body": false
    }
  ]
}
```

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

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/workflow.proto#L21-L30`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/workflow.proto#L21-L30>)

<section class="proto-fields-table" markdown>
| 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")</span><br><em class="proto-field-annotation">must be a defined enum value</em> | The scope of the state value to read when producing the group-by dimension. |
| key | <span class="proto-type proto-type-primitive">string</span><br><em class="proto-field-annotation">up to 100 chars</em> | The key of the state value to read within the selected scope. |

</section>
<p class="h4">Example</p>
```json
{
  "key": "example-key",
  "scope": "FEATURE_FLAG_EXPOSURE"
}
```

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

**Source definition:** [`src/bitdrift/public/unary/workflows/v1/workflow.proto#L35-L50`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/workflows/v1/workflow.proto#L35-L50>)

One additional dimension to attach to emitted metrics for a chart time series. Exactly one
 source must be chosen. Each emitted metric will include the extracted value under the
 resulting dimension name so that value is available alongside the charted series.

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| field_key | <span class="proto-type proto-type-primitive">string</span><br><em class="proto-field-annotation">up to 100 chars</em><span class="proto-field-annotation">only one of <em>field_key</em>, or <em>log_body</em>, <em>state_value</em> can be set</span> | The value of the named log field from the event that produced the metric. The field name  also becomes the dimension name on the emitted metric. |
| log_body | <span class="proto-type proto-type-primitive">bool</span><span class="proto-field-annotation">only one of <em>log_body</em>, or <em>field_key</em>, <em>state_value</em> can be set</span> | The full log message body as the dimension value. This only applies to log events. |
| 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 "bitdrift.public.unary.workflows.v1.GroupBy.StateValue")</span><span class="proto-field-annotation">only one of <em>state_value</em>, or <em>field_key</em>, <em>log_body</em> can be set</span> | A value read from state using the provided scope and key. The key becomes the dimension  name on the emitted metric. |

</section>
<p class="h4">Example</p>
```json
{
  "log_body": false
}
```

