Skip to content

Commit fb8b4f5

Browse files
committed
out_loki: Address review comments
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent c9eece1 commit fb8b4f5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pipeline/outputs/loki.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ There is a separate Golang output plugin provided by [Grafana](https://grafana.c
2929
| `line_format` | Format to use when flattening the record to a log line. Valid values are `json` or `key_value`. If set to `json`, the log line sent to Loki will be the Fluent Bit record dumped as JSON. If set to `key_value`, the log line will be each item in the record concatenated together (separated by a single space) in the format. | `json` |
3030
| `auto_kubernetes_labels` | If set to `true`, adds all Kubernetes labels to the stream labels. | `false` |
3131
| `tenant_id_key` | Specify the name of the key from the original record that contains the Tenant ID. The value of the key is set as `X-Scope-OrgID` of HTTP header. Use to set Tenant ID dynamically. | _none_ |
32-
| `tenant_id_key_error_handling` | Set how `tenant_id_key` split request failures affect the whole chunk. Options are `partial_success`, to treat mixed success and failure as success, or `partial_error`, to retry mixed success and failure. | `partial_success` |
32+
| `tenant_id_key_error_handling` | Set how `tenant_id_key` split request failures affect the whole chunk. Options are `partial_success` (treat mixed success and failure as success; records for failed tenants are dropped), or `partial_error` (retry mixed success and failure; may result in duplicate records for successful tenants). | `partial_success` |
3333
| `buffer_size` | Maximum HTTP response buffer size. | `512KB` |
3434
| `compress` | Set payload compression mechanism. The only available option is `gzip`. | _none_ |
3535
| `workers` | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. | `0` |
@@ -313,6 +313,8 @@ job="fluentbit", team="Santiago Wanderers"
313313

314314
Use `tenant_id_key` to route records to Loki tenants dynamically. Fluent Bit reads the tenant ID from the specified record key and sends it as the `X-Scope-OrgID` HTTP header. When a chunk contains records for multiple tenants, Fluent Bit splits the chunk into one request per tenant.
315315

316+
If `tenant_id_key` resolves to a missing or empty value for a record, Fluent Bit falls back to the static `tenant_id`, if set, and sends `X-Scope-OrgID` with that value. If both `tenant_id_key` and `tenant_id` are missing or empty, Fluent Bit treats the record as single-tenant and sends no `X-Scope-OrgID` header. This fallback behavior also applies when using `tenant_id_key_error_handling`, so fallback records are included in the corresponding per-tenant request.
317+
316318
The `tenant_id_key_error_handling` option controls how Fluent Bit treats mixed results when one tenant request succeeds and another fails:
317319

318320
- `partial_success`: treat the chunk as successful when at least one tenant request succeeds. This is the default.

0 commit comments

Comments
 (0)