# How to direct logs to right bucket via openpipeline

**URL:** <https://community.dynatrace.com/t/how-to-direct-logs-to-right-bucket-via-openpipeline/56389>\
**Category:** Logs\
**Tags:** openpipeline, log-processing, log-configuration, data-ingest\
**Created:** [July 8, 2026, 12:20pm UTC](https://community.dynatrace.com/t/how-to-direct-logs-to-right-bucket-via-openpipeline/56389 "2026-07-08T12:20:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JannickDT\_CM](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@JannickDT\_CM](https://community.dynatrace.com/u/JannickDT_CM)\
**Post date:** [July 8, 2026, 12:20pm UTC](https://community.dynatrace.com/t/how-to-direct-logs-to-right-bucket-via-openpipeline/56389/1 "2026-07-08T12:20:22Z")

</div>

What is the best approach to direct my logs to the right bucket, making use of a openpipeline?

Can anybody provide me more info/details how to do this?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![thomas\_billi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/thomas_billi/32/25487_2.png) [@thomas\_billi](https://community.dynatrace.com/u/thomas_billi)\
**Post date:** [July 9, 2026, 7:11am UTC](https://community.dynatrace.com/t/how-to-direct-logs-to-right-bucket-via-openpipeline/56389/2 "2026-07-09T07:11:17Z")

</div>

There are two ways to control which Grail bucket your logs land in:

**Option 1 — Bucket assignment processor in a pipeline (recommended)**

In OpenPipeline, each pipeline has a dedicated&nbsp; **Storage** &nbsp;stage that runs after all processing. You configure a&nbsp;_bucket assignment_&nbsp;processor there:

1. Go to&nbsp; **OpenPipeline → Logs** &nbsp;and open (or create) the pipeline that matches your log source.
2. In the&nbsp; **Storage** &nbsp;stage, add a bucket assignment rule.
3. Set a&nbsp; **match condition** &nbsp;(e.g.,&nbsp;`matchesPhrase(content, "my-app")`&nbsp;or check an attribute like&nbsp;`k8s.namespace.name == "prod"`) to select which records go where.
4. Set the&nbsp; **target bucket** &nbsp;for records that match.
5. Add a fallback rule at the bottom (no condition) to catch everything else.

Rules are evaluated top-to-bottom — first match wins.

**Option 2 — Send&nbsp;`dt.system.bucket`&nbsp;at ingest time**

If you control the sending side (e.g., a custom log shipper or the Logs Ingest API), you can set the&nbsp;`dt.system.bucket`&nbsp;attribute directly on each log record before sending. OpenPipeline will honour it.

Documentation for OpenPipeline is here:

> **[OpenPipeline](https://docs.dynatrace.com/docs/platform/openpipeline)**
>
> Scale Dynatrace platform data handling with Dynatrace OpenPipeline.
