Skip to content

Commit

Permalink
chore: better document that qps stats aren't real-time
Browse files Browse the repository at this point in the history
Addresses #4.

TL;DR: NS1 qps stats are time delayed, not real time. Updates README and
the help text of the metric itself to make it clearer.

relevant docs:

https://ns1.com/api?docId=2361
  • Loading branch information
tjhop committed Dec 21, 2023
1 parent 7c42f29 commit cf7b4a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ _Note_: While packages are built for several systems, there are currently no pla

The primary purpose of the exporter is to expose NS1 DNS queries-per-second stats from the NS1 API.

> :warning: _NOTE_: The queries-per-second statistics available from the NS1 API are not real-time, but are time delayed. This means that the metric values that are exposed to Prometheus are not real-time. This exporter makes no attempt to adjust metric timestamp to try and align the corresponding timestamp with the qps values.
An example Prometheus configuration file demonstrating how to scrape metrics can be found in [docs/examples/prometheus_ns1_metrics.yml](./docs/examples/prometheus_ns1_metrics.yml)

### Metrics
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
)
MetricQPSDesc = prometheus.NewDesc(
prometheus.BuildFQName(metricNamespace, "stats", "queries_per_second"),
"DNS queries per second for the labeled NS1 resource.",
"DNS queries per second for the labeled NS1 resource. Note that NS1 QPS metrics are time delayed, not real-time.",
[]string{"zone_name", "record_name", "record_type"}, nil,
)

Expand Down

0 comments on commit cf7b4a0

Please sign in to comment.