All notable changes to dns_exporter
will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- No changes yet
1.0.0 represents the first stable release of dns_exporter
. Future changes (especially concerning metrics naming and labels) will follow semver rules regarding versioning. The goal is to never introduce dashboard breaking changes to metrics without bumping the major version.
The details about all the changes through the pre-releases are included below, but are probably only interesting if you have been using a pre-1.0 version. If you have existing dashboards with pre-1.0 data you will need to create new, seperate dashboards for 1.0 because the metrics have changed so much. You can use https://grafana.com/grafana/dashboards/20617-dns-exporter/ as a starting point for your own dashboards.
- Remove wrong buckets on response time Histogram, replace with default buckets
- Catch
httpx.ConnectTimeout
from protocoldoh
as failure reasontimeout
- Add more labels to the
dnsexp_scrape_failures_total
metric so it has all the same labels asdnsexp_dns_query_time_seconds
in addition to thereason
label.
- Always send Content-Length header for metrics responses
- Do not overwrite
no_nsid
placeholder if a blank NSID is received from server (to avoid blank labels)
- Add the
monitor
label in all examples, also the ones scraping internal metrics
- Minimum supported DNSPython version is now 2.5.0
- Log at level warning when encountering an unknown failure
- Remove failure reason
connection_refused
and report it asconnection_error
along with the rest of socket related errors. - Remove
dnsexp_failures_total
from per-scrape metrics. Failure reasons are now tracked only under/metrics
. - Switch from
http.server.HTTPServer
tohttp.server.ThreadingHTTPServer
- Add new failure reason
invalid_response_statuscode
for DoH failures. - The default for the
collect_ttl_rr_value_length
has been changed from255
to50
to reduce label cardinality. - Docs: Mention the importance of scraping internal metrics under
/metrics
- Docs: Mention adding a
monitor
label to identify the exporter in use, for setups where multiple instances ofdns_exporter
is running. - Update unit tests for all of the above
- Always send content-length header for static responses (#100, thanks @jcodybaker!)
- Unit tests for proxy code
- Unit tests for new code introduced to make ruff happy
- New
collect_ttl
setting to control collection of per-RR TTL metrics. Default is true. - New
verify_certificate
bool setting to control validation of certificates on encrypted protocols. Default is true. - New
verify_certificate_path
str setting to override the system CA when validating certificates on encrypted protocols. Leave empty to use the default system CA. Default is an empty string.
- Replace black, flake8, isort, pydocstyle with ruff
- Some refactoring to reduce complexity and ease testing
- Much linting
- Move coverage.py config to .coveragerc to make showing measurement contexts in coverage html work
- Proxy support for DoQ disabled, pending next dnspython release with rthalley/dnspython#1060
- Improve unit tests
- Polish dockerhub action a bit (thanks @dallemon!)
- Re-add custom histogram buckets for metric
dnsexp_dns_responsetime_sedonds
from 1 second doubling until 4194304 seconds (48 days). - Build docs in
pre-commit
to avoid breaking them - Include
protocol
,server
, andproxy
labels in thednsexp_scrape_failures_total
Counter metric.
- Fixed a bug which made
fail_if_all_match_regexp
validation succeed on the first matching RR (not considering further RRs).
- Updated some dev and test dependencies
- Improve debug logging
- Enable proxy support for all protocols except DoT
- Update codecov GH action to silence warning in CI
- Handle errors in unit test setup better
- Wrote a real describe() method in the collector
- Support dnspython 2.6.0 as well as earlier versions
- Add ttl metrics for all rrs.
- Improve logformat used during unit tests
- Basic proxy support for plain TCP DNS lookups, supported proxy types are SOCKS4, SOCKS5 and HTTP.
- Introduced pytest-mock test dependency to help with testing proxy code
- Three new failure modes:
invalid_request_proxy
,connection_error
,connection_refused
- Suppress warnings at runtime (to silence dependencies)
- Fail with a nice message if the port is in use when starting the exporter
- DockerHub workflow unbroken, take 2
- DockerHub workflow unbroken
- Update CHANGELOG
- Add more badges to README.md
Version 1.0.0 is a major refactor. It changes some metric names and has many internal changes. It also enables DoQ support. Most stuff should work as it did before 1.0.0 though.
The metrics exposed under /query (per-scrape metrics) are now:
- dnsexp_dns_query_time_seconds (Gauge, unchanged)
- dnsexp_dns_query_success (Gauge, unchanged)
- dnsexp_dns_response_rr_ttl_seconds (Gauge, unchanged)
- dnsexp_failures_total (Counter, renamed and changed from Enum)
The metrics exposed under /metrics (persistent exporter-internal metrics) are now:
- dnsexp_build_version (Info, unchanged)
- dnsexp_http_requests_total (Counter, unchanged)
- dnsexp_http_responses_total (Counter, unchanged)
- dnsexp_dns_queries_total (Counter, unchanged)
- dnsexp_dns_responsetime_seconds (Histogram, renamed and changed from Counter)
- dnsexp_scrape_failures_total (Counter, renamed and got a reason label)
Further changes are mostly technical details.
- RELEASE.md file describing how to do a release
build
module to thedev
extras inpyproject.toml
- Python 3.12 support
- Automatic DockerHub upload of containers when new releases are tagged
- Automatic PyPi upload of packages when new releases are tagged
- Delete the
develop
branch,main
is the new default branch. UpdateRELEASE.md
to reflect the change. - Update some development dependencies
- Major refactor: move DNS lookup to a custom
prometheus_client.registry.Collector
class incollector.py
- DNS over QUIC support now works. Default port is 853 as per https://www.rfc-editor.org/rfc/rfc9250.html#name-port-selection
- Split code into seperate modules
- Rename
dnsexp_dns_time_seconds
todnsexp_dns_query_time_seconds
and change from Histogram to Gauge - Rename
dnsexp_dns_success
todnsexp_dns_query_success
- Rename
dnsexp_dns_failure_reason
todnsexp_dns_query_failure_reason
- Rename
dnsexp_dns_record_ttl_seconds
todnsexp_dns_response_rr_ttl_seconds
and change from Histogram to Gauge
- Command-line option to set listen IP, use
-L
or--listen-ip
. Default is127.0.0.1
. - Unit tests
- Github action to build a new dockerhub image when a new tag is pushed
- Python3.12 is now tested in CI
- Add a Dockerfile (thanks @dallemon)
- Split code into multiple modules
- Write unit tests
- Write documentation
- Many, many bugs while writing unit tests
- Removed the config file requirement
- Removed the requirement to supply a module in every scrape request
- Updated README.md with more information
This was the first public pre-release.
- CHANGELOG.md
- release.sh