open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.99k stars 2.31k forks source link

New component: DNS Query receiver #34954

Open stampflit opened 1 month ago

stampflit commented 1 month ago

The purpose and use-cases of the new component

The DNS query receiver is used to collect latency and error metrics about a DNS server. This receiver doesn't ingest observability data from an external source, but rather repeatedly performs DNS queries itself to produce the desired data.

This proposal is inspired by the existing Telegraf DNS Query Input Plugin

Example configuration for the component

receivers:
  dnsquery:
    # A list of DNS servers to monitor
    servers:
      - "8.8.8.8"
      - "1.1.1.1"
    # A list of DNS queries that should be performed
    queries:
      - domain: "example.com" # Domain or subdomain to query
        record_type: "A" # Record Type
    # Query timeout
    timeout: "2s"
    # Collection interval
    collection_interval: 30s

Telemetry data types supported

metrics

Is this a vendor-specific component?

Code Owner(s)

No response

Sponsor (optional)

No response

Additional context

I don't have a code owner or a sponsor. I'm opening this issue to see whether there is interest in general to have such a receiver and if so, to find a sponsor.

There are few similar use cases that come to mind for such a component:

The latter two points are also covered by httpcheckreceiver, though the complexity of modern http is much higher compared with traditional DNS.

atoulme commented 1 week ago

Can you detail the metrics you would create with this? Names and attributes in particular.