-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New component: DNS lookup processor #34398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could we have this support multiple nameservers right away, or is the intention to add that in a later revision? Any thoughts on TCP transport? |
Yes, it makes sense to support multiple.
I think it is a nice to have feature and could be in a later version |
I can sponsor this component, as long as you propose two code owners, so that one code owner's pull requests can be reviewed by the other code owner and vice versa. This will make it easier for me to review the PRs as the sponsor and third code owner. |
Thank you @andrzej-stencel, I'd be glad to be the second code owner for this component. If @kaisecheng has the availability and agrees, she could be first one. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
The proposal lacked details on how hostnames or IPs are resolved from attributes and how the results are stored. I took a lot of inspiration from GeoIP processor. processors:
dnslookup:
resolve:
enabled: true
# Context for attributes: "resource" (default) or "record"
context: "resource"
# List of attributes to check. Take the first valid hostname
attributes: ["server.address", "custom.address"]
# Attribute to store the resolved IP
lookedup_attribute: "server.ip"
reverse:
enabled: false
context: "resource"
# List of attributes to check. Take the first valid IP
attributes: ["server.ip", "custom.ip"]
# Attribute to store the resolved hostname
lookedup_attribute: "server.address"
miss_cache_size: 1000
miss_cache_ttl: 30
hit_cache_size: 1000
hit_cache_ttl: 60
max_retries: 2
timeout: 0.5
hostfiles: ["/path/to/hosts"]
nameservers: [ "8.8.8.8" ]
enable_system_resolver: false The processor iterates through Both forward (resolve) and reverse DNS lookups share the same caching, retry, and timeout configurations. |
#### Description Add a no-op skeleton of DNSLookup processor. Related to #34398
…emetry#39344) #### Description Add a no-op skeleton of DNSLookup processor. Related to open-telemetry#34398
…emetry#39344) #### Description Add a no-op skeleton of DNSLookup processor. Related to open-telemetry#34398
The purpose and use-cases of the new component
The DNS lookup Processor is for resolving hostnames to IP addresses and vice versa. It is particularly useful when the GeoIP processor receives a hostname and needs to convert it to an IP address in order to resolve the geo location.
The processor performs A record/CNAME record lookups to resolve hostnames to IP addresses, and PTR record lookups for reverse DNS resolution (IP to hostname). The resolved value replaces the original value.
The processor utilizes two LRU (Least Recently Used) caches with TTL (Time-to-Live): one for storing successful resolutions (hit cache) and another for storing failed lookups.
The processor can resolve hostnames/IPs using the system's default resolver, a custom hostfile, or a custom DNS server.
Example configuration for the component
Resolution Order
The resolution order depends on the specified configuration and the
enable_system_resolver
setting:With
enable_system_resolver
set totrue
:When both
hostfile
andnameserver
are specified:Custom hostfile -> Custom DNS server -> System's default resolver
When only
nameserver
is specified:Custom DNS server -> System's default resolver
When only
hostfile
is specified:Custom hostfile -> System's default resolver
When neither
hostfile
nornameserver
are specified:System's default resolver
With
enable_system_resolver
set tofalse
, this affects all scenarios above by removing System's default resolver from the resolution order.The processor will fail to start and throw an error If neither
hostfile
nornameserver
are specified andenable_system_resolver
is set tofalse
.Considerations
Telemetry data types supported
Logs, metrics, traces.
Is this a vendor-specific component?
Code Owner(s)
@kaisecheng @edmocosta
Sponsor (optional)
@andrzej-stencel
Additional context
No response
The text was updated successfully, but these errors were encountered: