Skip to content

New executor documentation#197

Open
mavam wants to merge 12 commits intomainfrom
topic/new-executor
Open

New executor documentation#197
mavam wants to merge 12 commits intomainfrom
topic/new-executor

Conversation

@mavam
Copy link
Copy Markdown
Member

@mavam mavam commented Feb 9, 2026

Summary

Feature branch for the new executor documentation.

Individual sub-PRs will target this branch so they can be reviewed and merged
incrementally. Once all pieces are in place, this branch merges into main.

(Continuation of #192, moved to a topic branch after reverting the premature merge to main.)

Test plan

  • Sub-PRs pass CI individually
  • Final merge into main passes build

@github-actions github-actions bot added reference Reference documentation integration Integration documentation site Site infrastructure labels Feb 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 9, 2026

📦 Preview  ·  View →  ·  🟢 Live

Auto-updates on push

@mavam mavam force-pushed the topic/new-executor branch 2 times, most recently from 8c59ee1 to 3886444 Compare February 19, 2026 12:21
mavam and others added 6 commits February 25, 2026 22:26
…#190)

* Add MySQL integration documentation and from_mysql operator reference

Adds comprehensive documentation for the from_mysql operator, including:
- New integration page at /integrations/mysql
- Detailed operator reference at /reference/operators/from_mysql with
  parameter descriptions, type mappings, and usage examples
- Updates to integration and operator index pages to include MySQL

The from_mysql operator enables reading data from MySQL databases using
table selection, raw SQL queries, or metadata inspection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Finalize docs

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add from_tcp operator documentation

Document the new from_tcp operator with TLS support, including
the tls record parameter, peer variable, and usage examples.
Update the TCP integration page and cross-reference from_tcp
in load_tcp and save_tcp See Also sections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix from_tcp docs: use $peer syntax and correct types

Use $peer instead of peer for let-bound variable references in
sub-pipelines. Correct the ip field type from string to ip and
the port field type from int to int64.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Document the `live` and `tracking_column` parameters that enable
continuous polling for new rows using watermark tracking on an
integer column. Add examples for both auto-detected and explicit
tracking columns.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add note explaining that internal metadata queries use MySQL prepared
statements to prevent SQL injection through user-provided table and
column names.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mavam mavam force-pushed the topic/new-executor branch from 588262f to 17b8b2b Compare February 25, 2026 21:26
mavam and others added 5 commits February 25, 2026 22:34
* Add read_tql operator documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use from_file with read_tql in examples

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Replace round-trip example with schema and selector examples

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert "Replace round-trip example with schema and selector examples"

This reverts commit b2f4078.

* Remove round-trip example

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 15, 2026

📝 Walkthrough

Walkthrough

Adds MySQL integration docs and diagram; introduces new operators (from_stdin, from_mysql, read_tql, accept_tcp, to_tcp, serve_tcp, from_tcp); updates many TCP-related docs to new accept/to/serve operator forms; adjusts several operator docs (batch, measure, parallel) and sidebar to include MySQL.

Changes

Cohort / File(s) Summary
MySQL integration
src/content/docs/integrations/mysql.mdx, src/content/docs/integrations/mysql.excalidraw
New MySQL integration page with examples (from_mysql), deployment notes, and accompanying Excalidraw diagram asset.
New operator docs
src/content/docs/reference/operators/from_stdin.mdx, src/content/docs/reference/operators/from_mysql.mdx, src/content/docs/reference/operators/read_tql.mdx, src/content/docs/reference/operators/accept_tcp.mdx, src/content/docs/reference/operators/to_tcp.mdx, src/content/docs/reference/operators/serve_tcp.mdx, src/content/docs/reference/operators/from_tcp.mdx
Adds reference pages for new operators: syntax, examples, TLS options, behaviors (streaming, reconnection, routing, piping bytes), and See Also links.
TCP-related docs & examples
src/content/docs/integrations/index.mdx, src/content/docs/integrations/tcp.mdx, src/content/docs/guides/collecting/get-data-from-the-network.mdx, src/content/docs/integrations/syslog.mdx, src/content/docs/integrations/microsoft/windows-event-logs.mdx, src/content/docs/guides/node-setup/configure-tls.mdx, src/content/docs/explanations/configuration.mdx, src/content/docs/guides/routing/*.md, src/content/docs/reference/operators/*read_*.md
Replaces many load_tcp/save_tcp usages and prose with new accept_tcp/to_tcp/serve_tcp/from_tcp forms; consolidates TLS guidance into tls option object; updates examples to nested block form where applicable.
Operator adjustments
src/content/docs/reference/operators/batch.md, src/content/docs/reference/operators/measure.md, src/content/docs/reference/operators/parallel.mdx, src/content/docs/reference/operators/read_tql.mdx, src/content/docs/reference/operators/read_tql.mdx
Batch: clarified per-schema buffers and explicit default timeout; Measure: removed real_time option from signature; Parallel: added optional jobs and route_by semantics, examples, and reordering notes; added read_tql doc.
Cross-references & see-also updates
src/content/docs/reference/operators.mdx, src/content/docs/reference/operators/load_tcp.mdx, src/content/docs/reference/operators/save_tcp.mdx, src/content/docs/reference/operators/write_tql.mdx, src/content/docs/reference/operators/*
Inserted new operator entries (from_stdin, from_mysql, read_tql, from_tcp, to_tcp, accept_tcp, serve_tcp) into operator lists and See Also sections; updated deprecation notes and removed/reshuffled older TCP references.
Sidebar / Index
src/sidebar.ts, src/content/docs/integrations/index.mdx
Added integrations/mysql to the sidebar Data Tools list; reformatted integration index prose and added AI-assisted package generation reference.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Client as Client
participant Tenzir as Tenzir (from_mysql)
participant MySQL as MySQL DB

Client->>Tenzir: Submit pipeline using from_mysql (table/sql/stream)
Tenzir->>MySQL: Connect using URI/host+creds (TLS optional)
MySQL-->>Tenzir: Return rows / stream rows
Tenzir->>Tenzir: Map MySQL types -> internal types, track watermark (tracking_column)
Tenzir-->>Client: Emit events (initial results / live streamed rows)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 I nibbled docs by lantern light,
Added MySQL and operators bright,
TCP now listens, serves, and sends,
Pipelines hop to new rabbit friends,
Diagrams, examples—hoppy night!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'New executor documentation' is vague and generic, using non-descriptive terms that don't clearly convey the specific changes in this PR. Consider a more specific title that reflects the main documentation additions, such as 'Add MySQL and TCP operator documentation' or 'Document new MySQL integration and TCP operators'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The PR description clearly explains that this is a feature branch for new executor documentation, noting it's a continuation of previous work and will be merged incrementally via sub-PRs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch topic/new-executor
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/content/docs/reference/operators/measure.md (1)

39-90: 🧹 Nitpick | 🔵 Trivial

Consider adding an example demonstrating the cumulative parameter.

The examples effectively show basic usage of measure, but none demonstrate the cumulative parameter—the only configurable option for this operator. Adding an example with cumulative=true would help users understand the difference between per-batch statistics and running totals.

For instance, you could add an example showing how measure cumulative=true produces running totals for events or bytes, making it clearer when to use this option versus post-processing with summarize.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/reference/operators/measure.md` around lines 39 - 90, Add a
new example demonstrating the cumulative parameter for the measure operator:
show a short TQL snippet that loads a file (e.g., load_file "eve.json" /
read_suricata) and runs measure with cumulative=true (measure cumulative=true)
and include the expected output illustrating running totals (increasing events
or bytes across batches) so readers can compare it to the existing
non-cumulative examples; reference the measure operator and the cumulative=true
flag and mention summarizing with summarize (e.g., summarize schema,
events=sum(events)) as a contrast.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/content/docs/reference/operators.mdx`:
- Around line 362-373: Add the new operator entry to the operators index
frontmatter and the rendered card grid by inserting an operators list item with
name: 'from_tcp', description: 'Reads events from a TCP socket.', example:
'from_tcp "0.0.0.0:8090" { read_json }' and path: 'reference/operators/from_tcp'
into the frontmatter operators: array, and add a corresponding ReferenceCard
block for from_tcp in the grid (match the existing card structure used for
from_stdin/from_kafka/from_mysql) so the new reference/operators/from_tcp page
appears in the overview and card grid.

In `@src/content/docs/reference/operators/from_mysql.mdx`:
- Around line 24-29: The doc incorrectly states that show is mutually exclusive
with table; clarify that the three modes are: Table mode (use table to read
rows), SQL mode (use sql to run custom queries), and Show mode (use show to list
objects) but note that show is mutually exclusive with sql while some show
values (e.g., show="columns") require a table parameter; update the top summary
and the other occurrences referencing the modes (mentions of table/sql/show and
the example using show="columns") to explicitly state "show is exclusive with
sql, but show='columns' accepts/needs table='<name>'" and adjust the wording at
the other sections (lines referenced) accordingly so examples and constraints
are consistent with the parameter behavior.
- Around line 30-32: Update the sentence about MySQL prepared statements to
clarify they protect bound values, not identifiers: change the line mentioning
"prevent SQL injection through user-provided table and column names" to say that
internal metadata queries (e.g., resolving tracking columns for live mode)
validate or allowlist user-provided table and column names before executing
prepared statements, and that prepared statements are used to safely bind
values; for example: "Internal metadata queries (such as resolving tracking
columns for live mode) validate user-provided table and column names against a
safe list and then use MySQL prepared statements to safely bind values and
prevent SQL injection."

In `@src/content/docs/reference/operators/from_stdin.mdx`:
- Around line 30-40: Update the shell example so it actually runs the TQL
pipeline shown below: pipe the JSON into the tenzir CLI and invoke the TQL query
that uses from_stdin { read_json } (i.e. pass the TQL snippet to tenzir so the
input is parsed by read_json). Ensure the echo ... | tenzir invocation includes
the TQL query for from_stdin/read_json so the command is copy-paste runnable.

---

Outside diff comments:
In `@src/content/docs/reference/operators/measure.md`:
- Around line 39-90: Add a new example demonstrating the cumulative parameter
for the measure operator: show a short TQL snippet that loads a file (e.g.,
load_file "eve.json" / read_suricata) and runs measure with cumulative=true
(measure cumulative=true) and include the expected output illustrating running
totals (increasing events or bytes across batches) so readers can compare it to
the existing non-cumulative examples; reference the measure operator and the
cumulative=true flag and mention summarizing with summarize (e.g., summarize
schema, events=sum(events)) as a contrast.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d95507d1-9d7b-4695-89c3-ccfd6f408c66

📥 Commits

Reviewing files that changed from the base of the PR and between 5299540 and 2621f79.

📒 Files selected for processing (16)
  • src/content/docs/integrations/index.mdx
  • src/content/docs/integrations/mysql.excalidraw
  • src/content/docs/integrations/mysql.mdx
  • src/content/docs/integrations/tcp.mdx
  • src/content/docs/reference/operators.mdx
  • src/content/docs/reference/operators/batch.md
  • src/content/docs/reference/operators/from_mysql.mdx
  • src/content/docs/reference/operators/from_stdin.mdx
  • src/content/docs/reference/operators/from_tcp.mdx
  • src/content/docs/reference/operators/load_tcp.mdx
  • src/content/docs/reference/operators/measure.md
  • src/content/docs/reference/operators/parallel.mdx
  • src/content/docs/reference/operators/read_tql.mdx
  • src/content/docs/reference/operators/save_tcp.mdx
  • src/content/docs/reference/operators/write_tql.mdx
  • src/sidebar.ts

Comment on lines +362 to +373
- name: 'from_stdin'
description: 'Reads and parses events from standard input.'
example: 'from_stdin { read_json }'
path: 'reference/operators/from_stdin'
- name: 'from_kafka'
description: 'Receives events from an Apache Kafka topic.'
example: 'from_kafka "logs"'
path: 'reference/operators/from_kafka'
- name: 'from_mysql'
description: 'Reads events from a MySQL database.'
example: 'from_mysql table="users", host="db.example.com", database="mydb"'
path: 'reference/operators/from_mysql'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add from_tcp to the operators index and card grid.

This PR adds reference/operators/from_tcp.mdx, but this overview page still omits from_tcp in both the frontmatter operators: list and the rendered cards, which makes the new operator hard to discover from the main reference page.

Suggested patch shape
+  - name: 'from_tcp'
+    description: 'Listens for incoming TCP connections and reads bytes from each connection.'
+    example: 'from_tcp "0.0.0.0:8090" { read_json }'
+    path: 'reference/operators/from_tcp'
+<ReferenceCard title="from_tcp" description="Listens for incoming TCP connections and reads bytes from each connection." href="/reference/operators/from_tcp">
+
+```tql
+from_tcp "0.0.0.0:8090" {
+  read_json
+}
+```
+
+</ReferenceCard>

Based on learnings: Applies to src/content/docs/reference/{functions,operators}/**/*.{md,mdx}: “Read .agents/references/reference-index-pages.md when adding, removing, or renaming pages under src/content/docs/reference/functions/ or src/content/docs/reference/operators/. Follow guidance on updating function and operator index pages.”

Also applies to: 2198-2221

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/reference/operators.mdx` around lines 362 - 373, Add the new
operator entry to the operators index frontmatter and the rendered card grid by
inserting an operators list item with name: 'from_tcp', description: 'Reads
events from a TCP socket.', example: 'from_tcp "0.0.0.0:8090" { read_json }' and
path: 'reference/operators/from_tcp' into the frontmatter operators: array, and
add a corresponding ReferenceCard block for from_tcp in the grid (match the
existing card structure used for from_stdin/from_kafka/from_mysql) so the new
reference/operators/from_tcp page appears in the overview and card grid.

Comment on lines +24 to +29
The operator supports three query modes that are mutually exclusive:

1. **Table mode**: Read all rows from a table using the `table` parameter
2. **SQL mode**: Execute a custom SQL query using the `sql` parameter
3. **Show mode**: List tables or columns using the `show` parameter

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Resolve the show/table mutual-exclusivity contradiction.

Current wording conflicts with your own example: show is described as mutually exclusive with table, but show="columns" requires table="..." and is documented that way later.

Suggested wording adjustment
-The operator supports three query modes that are mutually exclusive:
+The operator supports three primary query modes:

 1. **Table mode**: Read all rows from a table using the `table` parameter
 2. **SQL mode**: Execute a custom SQL query using the `sql` parameter
-3. **Show mode**: List tables or columns using the `show` parameter
+3. **Show mode**: List metadata using the `show` parameter (`show="columns"` also requires `table`)
-Retrieve database metadata. This is mutually exclusive with `table` and `sql`.
+Retrieve database metadata. This is mutually exclusive with `sql`.
+When `show="columns"`, set `table` to the table name.

Also applies to: 63-69, 190-194

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/reference/operators/from_mysql.mdx` around lines 24 - 29,
The doc incorrectly states that show is mutually exclusive with table; clarify
that the three modes are: Table mode (use table to read rows), SQL mode (use sql
to run custom queries), and Show mode (use show to list objects) but note that
show is mutually exclusive with sql while some show values (e.g.,
show="columns") require a table parameter; update the top summary and the other
occurrences referencing the modes (mentions of table/sql/show and the example
using show="columns") to explicitly state "show is exclusive with sql, but
show='columns' accepts/needs table='<name>'" and adjust the wording at the other
sections (lines referenced) accordingly so examples and constraints are
consistent with the parameter behavior.

Comment on lines +30 to +32
Internal metadata queries (such as resolving tracking columns for live mode) use
MySQL prepared statements to prevent SQL injection through user-provided table
and column names.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n src/content/docs/reference/operators/from_mysql.mdx | sed -n '20,45p'

Repository: tenzir/docs

Length of output: 1136


🏁 Script executed:

fd from_mysql --type f | grep -E '\.(cpp|h|cc|cxx|rs)$' | head -20

Repository: tenzir/docs

Length of output: 37


🏁 Script executed:

rg "from_mysql" src/content/docs/ -A 5 -B 5 | head -100

Repository: tenzir/docs

Length of output: 7291


🌐 Web query:

MySQL prepared statements table column identifiers SQL injection protection

💡 Result:

Prepared statements in MySQL protect you from SQL injection only for data values (e.g., WHERE id = ?), because placeholders/parameters are not permitted for identifiers like table names, column names, or SQL keywords. [1] Parameter binding also can’t change the structure of the SQL statement (so it can’t stand in for SELECT <column> FROM <table>). [3]

What to do when table/column must be dynamic:

  • Do not put user input directly into identifier positions.
  • Use an allow-list (whitelist): map a small set of allowed user choices to known-safe identifier strings (e.g., "name" -> \name`, "created" -> `created_at``), then concatenate only the mapped constant into the SQL. This is the recommended defense for query parts that can’t be parameterized (table/column/sort direction). [2]
  • After allow-listing, you may quote identifiers with backticks (`col`) for correctness, but quoting alone is not a safe substitute for allow-listing.

Example pattern (conceptual):

  • User supplies sort=created
  • Server maps via allow-list: created -> \created_at``
  • Query becomes: SELECT ... ORDER BY created_at LIMIT ? (only LIMIT ? is bound)

Sources: MySQL C API docs on parameters not being permitted for identifiers [1]; OWASP SQL Injection Prevention Cheat Sheet guidance to use allow-listing when parts can’t use bind variables (table/column/sort) [2]; explanation that bind parameters can’t change SQL structure (so not table/column names) [3].


Correct the description of prepared statement protections for identifiers.

Prepared statements in MySQL protect bound values, not identifiers like table or column names. The current wording implies prepared statements defend against injection through user-provided table and column names, which is incorrect. Rephrase to clarify that identifiers are protected via allowlisting/validation, not prepared statements. For example: "Internal metadata queries (such as resolving tracking columns for live mode) validate user-provided table and column names against a safe list before executing prepared statements to prevent SQL injection."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/reference/operators/from_mysql.mdx` around lines 30 - 32,
Update the sentence about MySQL prepared statements to clarify they protect
bound values, not identifiers: change the line mentioning "prevent SQL injection
through user-provided table and column names" to say that internal metadata
queries (e.g., resolving tracking columns for live mode) validate or allowlist
user-provided table and column names before executing prepared statements, and
that prepared statements are used to safely bind values; for example: "Internal
metadata queries (such as resolving tracking columns for live mode) validate
user-provided table and column names against a safe list and then use MySQL
prepared statements to safely bind values and prevent SQL injection."

Comment on lines +30 to +40
### Parse JSON from standard input

```sh
echo '{"foo": 42}' | tenzir
```

```tql
from_stdin {
read_json
}
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Complete the runnable JSON example command.

The shell command currently doesn’t include the parsing pipeline shown below it, so it’s not a copy-paste runnable example for the described result.

Suggested doc fix
-echo '{"foo": 42}' | tenzir
+echo '{"foo": 42}' | tenzir -f pipeline.tql
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/reference/operators/from_stdin.mdx` around lines 30 - 40,
Update the shell example so it actually runs the TQL pipeline shown below: pipe
the JSON into the tenzir CLI and invoke the TQL query that uses from_stdin {
read_json } (i.e. pass the TQL snippet to tenzir so the input is parsed by
read_json). Ensure the echo ... | tenzir invocation includes the TQL query for
from_stdin/read_json so the command is copy-paste runnable.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added guide How-to guides explanation Explanations labels Mar 16, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/content/docs/integrations/tcp.mdx`:
- Around line 39-45: In the "SSL/TLS" section remove the duplicated fragment
"like `certfile` and `keyfile`." so the sentence reads only once; locate the
repeated text under the SSL/TLS heading and delete the extra occurrence, then
verify spacing and punctuation around the remaining sentence to ensure the
paragraph reads cleanly.

In `@src/content/docs/reference/operators/save_tcp.mdx`:
- Around line 73-75: Update the "See Also" block to remove the deprecated
reference to load_tcp and replace it with the new migration targets—use to_tcp
and serve_tcp alongside from_tcp and keep the Integration tcp marker; locate the
See Also entries (symbols: from_tcp, load_tcp, Integration tcp) in save_tcp.mdx
and change load_tcp to to_tcp and/or serve_tcp to match the deprecation guidance
and the migration pattern (also consider updating the example referenced by the
example at Line 58 in a separate follow-up for consistency).

In `@src/content/docs/reference/operators/to_tcp.mdx`:
- Around line 29-32: Add a consistent TLS section header before the TLSOptions
partial: insert a "### tls = record (optional)" header immediately above where
TLSOptions is rendered (the <TLSOptions/> partial import/render in to_tcp.mdx)
so it matches the style used in accept_tcp.mdx and from_tcp.mdx; ensure the
header text exactly matches the other files for consistency.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ebfdf061-7af7-4bff-a708-3be8c6917466

📥 Commits

Reviewing files that changed from the base of the PR and between 2621f79 and 6956c8c.

📒 Files selected for processing (21)
  • src/content/docs/explanations/configuration.mdx
  • src/content/docs/guides/collecting/get-data-from-the-network.mdx
  • src/content/docs/guides/node-setup/configure-tls.mdx
  • src/content/docs/guides/routing/load-balance-pipelines.mdx
  • src/content/docs/guides/routing/send-to-destinations.mdx
  • src/content/docs/integrations/microsoft/windows-event-logs.mdx
  • src/content/docs/integrations/syslog.mdx
  • src/content/docs/integrations/tcp.mdx
  • src/content/docs/reference/functions/secret.mdx
  • src/content/docs/reference/operators/accept_tcp.mdx
  • src/content/docs/reference/operators/from.mdx
  • src/content/docs/reference/operators/from_tcp.mdx
  • src/content/docs/reference/operators/load_balance.mdx
  • src/content/docs/reference/operators/load_tcp.mdx
  • src/content/docs/reference/operators/read_delimited_regex.mdx
  • src/content/docs/reference/operators/read_gelf.mdx
  • src/content/docs/reference/operators/read_lines.mdx
  • src/content/docs/reference/operators/read_syslog.mdx
  • src/content/docs/reference/operators/save_tcp.mdx
  • src/content/docs/reference/operators/serve_tcp.mdx
  • src/content/docs/reference/operators/to_tcp.mdx

Comment on lines +39 to +45
## SSL/TLS

```tql
from "tcp://127.0.0.1:443", tls=true, certfile="cert.pem", keyfile="key.pem" {
read_json
}
```
All TCP operators support TLS via the `tls` option. Pass an empty record
(`tls={}`) for defaults, or provide specific options like `certfile` and
`keyfile`.
like `certfile` and
`keyfile`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Duplicate text detected at the end of the SSL/TLS section.

Lines 43-45 contain duplicated content. The text "like certfile and keyfile." appears twice.

🐛 Proposed fix to remove duplicate text
 ## SSL/TLS
 
 All TCP operators support TLS via the `tls` option. Pass an empty record
 (`tls={}`) for defaults, or provide specific options like `certfile` and
 `keyfile`.
- like `certfile` and
-`keyfile`.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## SSL/TLS
```tql
from "tcp://127.0.0.1:443", tls=true, certfile="cert.pem", keyfile="key.pem" {
read_json
}
```
All TCP operators support TLS via the `tls` option. Pass an empty record
(`tls={}`) for defaults, or provide specific options like `certfile` and
`keyfile`.
like `certfile` and
`keyfile`.
## SSL/TLS
All TCP operators support TLS via the `tls` option. Pass an empty record
(`tls={}`) for defaults, or provide specific options like `certfile` and
`keyfile`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/integrations/tcp.mdx` around lines 39 - 45, In the "SSL/TLS"
section remove the duplicated fragment "like `certfile` and `keyfile`." so the
sentence reads only once; locate the repeated text under the SSL/TLS heading and
delete the extra occurrence, then verify spacing and punctuation around the
remaining sentence to ensure the paragraph reads cleanly.

Comment on lines +73 to 75
- <Op>from_tcp</Op>
- <Op>load_tcp</Op>
- <Integration>tcp</Integration>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Replace legacy load_tcp in See Also with the new migration targets.

Line 74 still points to load_tcp, which conflicts with the deprecation guidance on Lines 11-12 (to_tcp / serve_tcp). This can send mixed migration guidance.

✏️ Suggested update
 ## See Also

 - <Op>from_tcp</Op>
-- <Op>load_tcp</Op>
+- <Op>to_tcp</Op>
+- <Op>serve_tcp</Op>
 - <Integration>tcp</Integration>

(Also consider aligning the example on Line 58 in a follow-up for consistency.)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- <Op>from_tcp</Op>
- <Op>load_tcp</Op>
- <Integration>tcp</Integration>
- <Op>from_tcp</Op>
- <Op>to_tcp</Op>
- <Op>serve_tcp</Op>
- <Integration>tcp</Integration>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/reference/operators/save_tcp.mdx` around lines 73 - 75,
Update the "See Also" block to remove the deprecated reference to load_tcp and
replace it with the new migration targets—use to_tcp and serve_tcp alongside
from_tcp and keep the Integration tcp marker; locate the See Also entries
(symbols: from_tcp, load_tcp, Integration tcp) in save_tcp.mdx and change
load_tcp to to_tcp and/or serve_tcp to match the deprecation guidance and the
migration pattern (also consider updating the example referenced by the example
at Line 58 in a separate follow-up for consistency).

Comment on lines +29 to +32

import TLSOptions from '@partials/operators/TLSOptions.mdx';

<TLSOptions/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider adding a section header for TLS options.

Unlike accept_tcp.mdx and from_tcp.mdx which have ### tls = record (optional) headers before the <TLSOptions/> partial, this file imports and renders TLSOptions without a preceding header. For consistency, consider adding a ### tls = record (optional) section before the import.

Proposed fix
 `[tcp://]<hostname>:<port>`.
 
+### `tls = record (optional)`
+
 import TLSOptions from '@partials/operators/TLSOptions.mdx';
 
 <TLSOptions/>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import TLSOptions from '@partials/operators/TLSOptions.mdx';
<TLSOptions/>
### `tls = record (optional)`
import TLSOptions from '@partials/operators/TLSOptions.mdx';
<TLSOptions/>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/reference/operators/to_tcp.mdx` around lines 29 - 32, Add a
consistent TLS section header before the TLSOptions partial: insert a "### tls =
record (optional)" header immediately above where TLSOptions is rendered (the
<TLSOptions/> partial import/render in to_tcp.mdx) so it matches the style used
in accept_tcp.mdx and from_tcp.mdx; ensure the header text exactly matches the
other files for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

explanation Explanations guide How-to guides integration Integration documentation reference Reference documentation site Site infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants