Repository navigation
documentation: fts: fix timestamp missing policy example - #12756
Conversation
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
…5 ➔ 5.2.0) (#1654) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [cr.fluentbit.io/fluent/fluent-bit](https://github.com/fluent/fluent-bit) | minor | `5.1.5` → `5.2.0` | --- ### Release Notes <details> <summary>fluent/fluent-bit (cr.fluentbit.io/fluent/fluent-bit)</summary> ### [`v5.2.0`](https://github.com/fluent/fluent-bit/releases/tag/v5.2.0): Fluent Bit 5.2.0 [Compare Source](fluent/fluent-bit@v5.1.5...v5.2.0) <https://fluentbit.io/announcements/v5.2.0/> ##### What's Changed - workflows: bump github/codeql-action/upload-sarif from 4.38.3 to 4.39.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​12607](fluent/fluent-bit#12607) - workflows: bump reviewdog/action-actionlint from 1.80.1 to 1.80.4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​12619](fluent/fluent-bit#12619) - motd: update banner to v5.2 by [@​edsiper](https://github.com/edsiper) in [#​12627](fluent/fluent-bit#12627) - release: prepare master for v5.2.0 development by [@​edsiper](https://github.com/edsiper) in [#​12625](fluent/fluent-bit#12625) - workflows: prepare release routing for v5.2 by [@​edsiper](https://github.com/edsiper) in [#​12626](fluent/fluent-bit#12626) - workflows: verify and set release PR base branches by [@​edsiper](https://github.com/edsiper) in [#​12629](fluent/fluent-bit#12629) - lib: upgrade bundled jemalloc to 5.4.0 by [@​edsiper](https://github.com/edsiper) in [#​12493](fluent/fluent-bit#12493) - lib: upgrade LuaJIT and fix CMake wrapper compatibility by [@​edsiper](https://github.com/edsiper) in [#​12503](fluent/fluent-bit#12503) - lib: fix jemalloc header detection on older compilers by [@​cosmo0920](https://github.com/cosmo0920) in [#​12634](fluent/fluent-bit#12634) - lib: cfl: upgrade to v1.1.0 by [@​edsiper](https://github.com/edsiper) in [#​12630](fluent/fluent-bit#12630) - lib: ctraces: upgrade to v0.8.0 by [@​edsiper](https://github.com/edsiper) in [#​12637](fluent/fluent-bit#12637) - lib: cmetrics: upgrade to v2.3.1 by [@​edsiper](https://github.com/edsiper) in [#​12641](fluent/fluent-bit#12641) - in_tail: mitigate access violation on windows by [@​cosmo0920](https://github.com/cosmo0920) in [#​12642](fluent/fluent-bit#12642) - processor_fts: add Fluent Typed Scripting processor by [@​edsiper](https://github.com/edsiper) in [#​12589](fluent/fluent-bit#12589) - wasm: add experimental browser runtime and SDK by [@​edsiper](https://github.com/edsiper) in [#​12429](fluent/fluent-bit#12429) - upstream: network: mitigate tcp dns timeouts by [@​cosmo0920](https://github.com/cosmo0920) in [#​12644](fluent/fluent-bit#12644) - wasm: enable Fluent Typed Scripting in browser artifacts by [@​edsiper](https://github.com/edsiper) in [#​12645](fluent/fluent-bit#12645) - tests: integration: cover processor worker isolation after FTS by [@​edsiper](https://github.com/edsiper) in [#​12511](fluent/fluent-bit#12511) - processor_sql: preserve resource and scope groups when filtering logs by [@​edsiper](https://github.com/edsiper) in [#​12506](fluent/fluent-bit#12506) - processor: fuse compatible body content modifier chains by [@​edsiper](https://github.com/edsiper) in [#​12505](fluent/fluent-bit#12505) - lib: Import fluent/onigmo change by [@​cosmo0920](https://github.com/cosmo0920) in [#​12669](fluent/fluent-bit#12669) - workflows: enable unit tests for 5.1 pull requests by [@​cosmo0920](https://github.com/cosmo0920) in [#​12674](fluent/fluent-bit#12674) - in_opentelemetry: process eligible logs in HTTP workers by [@​edsiper](https://github.com/edsiper) in [#​12673](fluent/fluent-bit#12673) - lib: chunkio: upgrade to v1.5.5 by [@​edsiper](https://github.com/edsiper) in [#​12699](fluent/fluent-bit#12699) - lib: yyjson: upgrade to v0.13.0 by [@​edsiper](https://github.com/edsiper) in [#​12698](fluent/fluent-bit#12698) - lib: restore jemalloc 5.3.0 memory baseline by [@​edsiper](https://github.com/edsiper) in [#​12701](fluent/fluent-bit#12701) - ci: fix macOS shutdown, test fixtures, and browser teardown by [@​edsiper](https://github.com/edsiper) in [#​12702](fluent/fluent-bit#12702) - build: parallelize library builds and reuse core objects by [@​edsiper](https://github.com/edsiper) in [#​12706](fluent/fluent-bit#12706) - processor_journald_otel: handle journald as otel processed logs by [@​cosmo0920](https://github.com/cosmo0920) in [#​12387](fluent/fluent-bit#12387) - in_forward: Added a small protection to secure Forward with a preflight scanner by [@​cosmo0920](https://github.com/cosmo0920) in [#​12686](fluent/fluent-bit#12686) - tests: parallelize six runtime suites by [@​edsiper](https://github.com/edsiper) in [#​12707](fluent/fluent-bit#12707) - build: libyaml: find libyaml without pkg-config by [@​edsiper](https://github.com/edsiper) in [#​12708](fluent/fluent-bit#12708) - build: upgrade SQLite to 3.54.1 and parallelize compilation by [@​edsiper](https://github.com/edsiper) in [#​12716](fluent/fluent-bit#12716) - build: correct generated dependency include paths by [@​edsiper](https://github.com/edsiper) in [#​12719](fluent/fluent-bit#12719) - wasm: filter_wasm: pack value len pair for returned format of wasm by [@​cosmo0920](https://github.com/cosmo0920) in [#​12518](fluent/fluent-bit#12518) - out_opentelemetry: respect dropped count metadata boundaries by [@​edsiper](https://github.com/edsiper) in [#​12507](fluent/fluent-bit#12507) - http_server: suppress HEAD bodies and preserve HTTP/2 trailers by [@​edsiper](https://github.com/edsiper) in [#​12727](fluent/fluent-bit#12727) - processor_fts: add reusable typed policy packs by [@​edsiper](https://github.com/edsiper) in [#​12731](fluent/fluent-bit#12731) - processor_fts: add JSON field decoding and log body unpacking by [@​edsiper](https://github.com/edsiper) in [#​12732](fluent/fluent-bit#12732) - out_forward: preserve log groups with dynamic tags by [@​edsiper](https://github.com/edsiper) in [#​12728](fluent/fluent-bit#12728) - out_vivo_exporter: fix telemetry loss and add compressed OTLP JSON by [@​edsiper](https://github.com/edsiper) in [#​12418](fluent/fluent-bit#12418) - processor_fts: add LuaLS definitions and JSON API export by [@​edsiper](https://github.com/edsiper) in [#​12733](fluent/fluent-bit#12733) - bin: generate YAML configuration from CLI options by [@​edsiper](https://github.com/edsiper) in [#​12353](fluent/fluent-bit#12353) - wasm: add local pipeline drain and reduce browser run latency by [@​edsiper](https://github.com/edsiper) in [#​12730](fluent/fluent-bit#12730) - workflows: publish validated experimental browser SDK releases by [@​edsiper](https://github.com/edsiper) in [#​12717](fluent/fluent-bit#12717) - fix(in_statsd): add missing break in STATSD_TYPE_TIMER case by [@​AruneshDwivedi](https://github.com/AruneshDwivedi) in [#​12494](fluent/fluent-bit#12494) - out_stackdriver: mitigate oob on stack driver by [@​cosmo0920](https://github.com/cosmo0920) in [#​12743](fluent/fluent-bit#12743) - out_chronicle: fix chronicle initialization leaks by [@​cosmo0920](https://github.com/cosmo0920) in [#​12736](fluent/fluent-bit#12736) - http_server: keep cached metrics when a push overlaps a read by [@​locker95](https://github.com/locker95) in [#​12684](fluent/fluent-bit#12684) - aws: Mitigate the AWS credential URI bypass by [@​cosmo0920](https://github.com/cosmo0920) in [#​12620](fluent/fluent-bit#12620) - in_syslog: mitigate potential overflow on payloads by [@​cosmo0920](https://github.com/cosmo0920) in [#​12584](fluent/fluent-bit#12584) - tests: fix HTTP JSON stream runtime assertions by [@​cosmo0920](https://github.com/cosmo0920) in [#​12582](fluent/fluent-bit#12582) - packaging: distros: almalinux: rockeylinux: centos: update requested packages by [@​sxd](https://github.com/sxd) in [#​12711](fluent/fluent-bit#12711) - oauth2_jwt: in_http: in_opentelemetry: Implement configurable OAuth2 jwks buffer size and its limit by [@​cosmo0920](https://github.com/cosmo0920) in [#​12694](fluent/fluent-bit#12694) - regex: mitigate regex unlimited stacks by [@​cosmo0920](https://github.com/cosmo0920) in [#​12734](fluent/fluent-bit#12734) - filter_rewrite_tag: fix emitter lifecycle and record preservation by [@​edsiper](https://github.com/edsiper) in [#​12668](fluent/fluent-bit#12668) - out_file: Mitigated the File output cardinality gap by [@​cosmo0920](https://github.com/cosmo0920) in [#​12676](fluent/fluent-bit#12676) - out_file: out_nats: Sanitize malicious tags by [@​cosmo0920](https://github.com/cosmo0920) in [#​12587](fluent/fluent-bit#12587) - upstream: out_s3: out_azure_blob: out_gcs: out_stackdriver: mitigate unexpectedly using plaintext payload on https scheme by [@​cosmo0920](https://github.com/cosmo0920) in [#​12622](fluent/fluent-bit#12622) - in_forward: in_syslog: in_unix_socket: harden unix input sockets by [@​cosmo0920](https://github.com/cosmo0920) in [#​12703](fluent/fluent-bit#12703) - socket: config: input: engine: Fix channel descriptor initialization and cleanup for descriptors by [@​cosmo0920](https://github.com/cosmo0920) in [#​12720](fluent/fluent-bit#12720) - http_client: out_opentelemetry: mitigate unbounded http ng requests by [@​cosmo0920](https://github.com/cosmo0920) in [#​12665](fluent/fluent-bit#12665) - in_prometheus_textfile: append multiple contexts of prometheus texts payloads by [@​cosmo0920](https://github.com/cosmo0920) in [#​12576](fluent/fluent-bit#12576) - out_kafka: avro: revise kafka schema validation by [@​cosmo0920](https://github.com/cosmo0920) in [#​12738](fluent/fluent-bit#12738) - http_server: mitigate fragmented HTTP/1 header reparsing with configurable limits by [@​cosmo0920](https://github.com/cosmo0920) in [#​12718](fluent/fluent-bit#12718) - in_node_exporter_metrics: add scrape_on_start option by [@​stondo](https://github.com/stondo) in [#​12638](fluent/fluent-bit#12638) - tls: propagate verify_hostname settings on tls context by [@​cosmo0920](https://github.com/cosmo0920) in [#​12635](fluent/fluent-bit#12635) - tests: integeration: config_format: address newer python failures and windows failures on integration tests by [@​cosmo0920](https://github.com/cosmo0920) in [#​12677](fluent/fluent-bit#12677) - utils: plugins: Implemented the path-shadowing mitigation for shadowed relative files by [@​cosmo0920](https://github.com/cosmo0920) in [#​12682](fluent/fluent-bit#12682) - output: engine: output_throttle: Implement throttle operations for output plugins by [@​cosmo0920](https://github.com/cosmo0920) in [#​12393](fluent/fluent-bit#12393) - output: mitigate heavy loaded case by [@​cosmo0920](https://github.com/cosmo0920) in [#​12484](fluent/fluent-bit#12484) - http_server: in_opentelemetry: plug decompress explosion possibilities by [@​cosmo0920](https://github.com/cosmo0920) in [#​12568](fluent/fluent-bit#12568) - filter_rewrite_tag: add opt-in input processor batching and supporting fixes by [@​edsiper](https://github.com/edsiper) in [#​12697](fluent/fluent-bit#12697) - http_server: mitigate automatic inflation bypass by [@​cosmo0920](https://github.com/cosmo0920) in [#​12581](fluent/fluent-bit#12581) - out_azure_blob, out_azure_kusto: fix buffered memory safety by [@​edsiper](https://github.com/edsiper) in [#​12748](fluent/fluent-bit#12748) - in_opentelemetry: bound OTLP decoding allocations by [@​cosmo0920](https://github.com/cosmo0920) in [#​12705](fluent/fluent-bit#12705) - workflows: allow package reads in master integration tests by [@​edsiper](https://github.com/edsiper) in [#​12749](fluent/fluent-bit#12749) - pipe, engine, processor_fts, tests: fix 5.2 release blockers by [@​edsiper](https://github.com/edsiper) in [#​12750](fluent/fluent-bit#12750) - oauth2_jwt: enforce JWKS connection and response deadlines by [@​edsiper](https://github.com/edsiper) in [#​12752](fluent/fluent-bit#12752) - filter_record_modifier: drop batches when all fields are removed by [@​edsiper](https://github.com/edsiper) in [#​12753](fluent/fluent-bit#12753) - filter_modify: reject rules with excess arguments by [@​edsiper](https://github.com/edsiper) in [#​12754](fluent/fluent-bit#12754) - documentation: fts: fix timestamp missing policy example by [@​edsiper](https://github.com/edsiper) in [#​12756](fluent/fluent-bit#12756) - filter_lua: isolate protected callback errors to the failing record by [@​edsiper](https://github.com/edsiper) in [#​12755](fluent/fluent-bit#12755) - input: fix collector crashes and 5.2 release regressions by [@​edsiper](https://github.com/edsiper) in [#​12758](fluent/fluent-bit#12758) ##### New Contributors - [@​AruneshDwivedi](https://github.com/AruneshDwivedi) made their first contribution in [#​12494](fluent/fluent-bit#12494) - [@​locker95](https://github.com/locker95) made their first contribution in [#​12684](fluent/fluent-bit#12684) **Full Changelog**: <fluent/fluent-bit@v5.1.5...v5.2.0> </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Berlin) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjEuNiIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMS42IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19--> Reviewed-on: https://git.xcd.dev/gabrielcosi/home-ops/pulls/1654
The documented
logs.parse_timestampexample useson_missing: preserve, but recipe validation accepts onlyskipanderror. Copying the example prevents Fluent Bit from starting withinvalid_configuration param=on_missing.Use
on_missing: skipand document both supported policies and the default. A missing source keeps the event timestamp unchanged; the OTel observed timestamp is preserved. Runtime behavior and the public API remain unchanged.Add an integration test that reads the YAML directly from the guide and runs it in both input and output processor contexts, checking valid timestamp parsing and exact preservation of the original timestamp when the field is missing. Before the documentation fix, both cases fail at startup.
Fixes #12747.
Validation:
ctest --test-dir build -R '^flb-it-fts$' --output-on-failure: passed.tests/integration/.venv/bin/python -m pytest tests/integration/scenarios/processor_fts/tests/test_fts_timestamp_example.py tests/integration/scenarios/processor_fts/tests/test_fts_api_definitions.py tests/integration/scenarios/processor_fts/tests/test_fts_recipe_catalog.py -k 'timestamp or api_definitions' -q: 12 passed.VALGRIND=1 VALGRIND_STRICT=1: 12 passed, no memory errors.python3 tools/fts/export_api_schema.py,python3 tools/fts/export_api_schema.py --check, andpython3 -m unittest discover -s tools/fts/tests -v: passed (6 unit tests). Declarations and API README checked against the bindings and embedded helpers; no API update needed.git diff --checkand CI-style commit-prefix validation for the branch range: passed.Compatibility: documentation correction only; no new policy values or configuration defaults.
Summary by CodeRabbit
logs.parse_timestampacceptsskiporerrorfor missing timestamp sources, witherroras the default.skipleaves the event timestamp unchanged while preserving the observed timestamp.