Document resolve_hostnames parameter for load_tcp#234
Merged
Conversation
Add documentation for the new resolve_hostnames parameter that enables reverse DNS lookup of peer IP addresses in TCP connections. See: tenzir/tenzir#5865 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4 tasks
tobim
added a commit
to tenzir/tenzir
that referenced
this pull request
Mar 6, 2026
## Summary - Make reverse DNS hostname resolution optional for the `load_tcp` operator via a new `resolve_hostnames` parameter - Default to `false` to prevent silent failures or exceptions in environments without reverse DNS - Add graceful error handling with debug logging when resolution fails ## Details ### Problem The `load_tcp` operator always attempted reverse DNS lookup for peer endpoints, which could: - Fail silently or throw exceptions in environments without reverse DNS support - Block or delay connection handling when DNS resolution hangs - Unnecessarily slow down data ingestion in scenarios where hostnames are not needed ### Solution - Added `resolve_hostnames: bool` parameter to `load_tcp_args` (defaults to `false`) - DNS resolution is only attempted when explicitly enabled - Errors during resolution are captured and logged at debug level instead of propagating - Peer IP addresses are always available; hostnames are optional ### Changed Files - `libtenzir/builtins/operators/load_tcp.cpp`: - Added `resolve_hostnames` field to `load_tcp_args` structure - Updated parameter inspection to include the new field - Modified `load_tcp_sink_operator` constructor to accept optional `peer_hostname` - Changed DNS resolution logic to check `resolve_hostnames` flag before resolving - Added error handling with debug logging for resolution failures - Updated parameter parsing to register the `resolve_hostnames` parameter ## Test Plan - [ ] Verify existing tests pass without changes (backward compatibility) - [ ] Test with `resolve_hostnames` disabled (default) - should work normally - [ ] Test with `resolve_hostnames` enabled - should resolve hostnames when available - [ ] Test with invalid/unreachable DNS - should log debug message and continue ## Documentation PR tenzir/docs#234
mavam
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the new
resolve_hostnamesparameter for theload_tcpoperator, which enables reverse DNS lookup of peer IP addresses in TCP connections.Related PR
This documents the changes from the main repository PR:
Changes
load_tcp.mdxto document theresolve_hostnamesparameterresolve_hostnamesand thepeer_fieldparameter