Skip to content

Commit 50b5c77

Browse files
author
owan
committed
feat: Add json_encoding option to service configuration
This commit adds the `json_encoding` option to the service configuration for both classic and YAML modes. This option allows users to control the encoding of raw UTF-8 strings when serializing MessagePack records to JSON.
1 parent 65148d9 commit 50b5c77

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

administration/configuring-fluent-bit/classic-mode/configuration-file.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The `Service` section defines global properties of the service. The following ke
3535
| `scheduler.cap` | Set a maximum retry time in seconds. Supported in v1.8.7 and greater. | `2000` |
3636
| `scheduler.base` | Set a base of exponential backoff. Supported in v1.8.7 and greater. | `5` |
3737
| `json.convert_nan_to_null` | If enabled, `NaN` converts to `null` when Fluent Bit converts `msgpack` to `json`. | `false` |
38+
| `json_encoding` | When Fluent Bit is serializing a MessagePack record into JSON, this option allows to specify the encoding of raw UTF-8 strings. The available options are `escaped` and `raw`. `escaped` is the default and it will escape the UTF-8 characters. `raw` will not escape the UTF-8 characters. | `escaped` |
3839
| `sp.convert_from_str_to_num` | If enabled, Stream processor converts from number string to number type. | `true` |
3940
| `windows.maxstdio` | If specified, the limit of stdio is adjusted. Only provided for Windows. From 512 to 2048 is allowed. | `512` |
4041

administration/configuring-fluent-bit/yaml/configuration-file.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ The `service` section defines the global properties of the service. The Service
8181
| `scheduler.cap` | Set a maximum retry time in seconds. Supported from v1.8.7. | `2000` |
8282
| `scheduler.base` | Sets the base of exponential backoff. Supported from v1.8.7. | `5` |
8383
| `json.convert_nan_to_null` | If enabled, NaN is converted to null when Fluent Bit converts `msgpack` to JSON. | `false` |
84+
| `json_encoding` | When Fluent Bit is serializing a MessagePack record into JSON, this option allows to specify the encoding of raw UTF-8 strings. The available options are `escaped` and `raw`. `escaped` is the default and it will escape the UTF-8 characters. `raw` will not escape the UTF-8 characters. | `escaped` |
8485
| `sp.convert_from_str_to_num` | If enabled, Stream processor converts from number string to number type. | `true` |
8586
| `windows.maxstdio` | If specified, the limit of stdio is adjusted. Only provided for Windows. From 512 to 2048 is allowed. | `512` |
8687

administration/configuring-fluent-bit/yaml/service-section.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The `service` section defines global properties of the service. The available co
99
| `daemon` | Boolean. Specifies whether Fluent Bit should run as a daemon (background process). Allowed values are: `yes`, `no`, `on`, and `off`. Don't enable when using a Systemd-based unit, such as the one provided in Fluent Bit packages. | `off` |
1010
| `dns.mode` | Sets the primary transport layer protocol used by the asynchronous DNS resolver. Can be overridden on a per-plugin basis. | `UDP` |
1111
| `log_file` | Absolute path for an optional log file. By default, all logs are redirected to the standard error interface (stderr). | _none_ |
12+
| `json_encoding` | When Fluent Bit is serializing a MessagePack record into JSON, this option allows to specify the encoding of raw UTF-8 strings. The available options are `escaped` and `raw`. `escaped` is the default and it will escape the UTF-8 characters. `raw` will not escape the UTF-8 characters. | `escaped` |
1213
| `log_level` | Sets the logging verbosity level. Allowed values are: `off`, `error`, `warn`, `info`, `debug`, and `trace`. Values are cumulative. If `debug` is set, it will include `error`, `warn`, `info`, and `debug`. Trace mode is only available if Fluent Bit was built with the _`WITH_TRACE`_ option enabled. | `info` |
1314
| `parsers_file` | Path for a `parsers` configuration file. Multiple `parsers_file` entries can be defined within the section. However, with the new YAML configuration schema, defining parsers using this key is now optional. Parsers can be declared directly in the `parsers` section of your YAML configuration, offering a more streamlined and integrated approach. | _none_ |
1415
| `plugins_file` | Path for a `plugins` configuration file. This file specifies the paths to external plugins (.so files) that Fluent Bit can load at runtime. With the new YAML schema, the `plugins_file` key is optional. External plugins can now be referenced directly within the `plugins` section, simplifying the plugin management process. [See an example](https://github.com/fluent/fluent-bit/blob/master/conf/plugins.conf). | _none_ |

0 commit comments

Comments
 (0)