feat(dnssec): add auth and trust dnssec
This commit is contained in:
@@ -9,19 +9,20 @@ import (
|
||||
)
|
||||
|
||||
type DNSMetric struct {
|
||||
Domain string `json:"domain"`
|
||||
QueryType string `json:"query_type"`
|
||||
Protocol string `json:"protocol"`
|
||||
DNSSEC bool `json:"dnssec"`
|
||||
KeepAlive bool `json:"keep_alive"`
|
||||
DNSServer string `json:"dns_server"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Duration int64 `json:"duration_ns"`
|
||||
DurationMs float64 `json:"duration_ms"`
|
||||
RequestSize int `json:"request_size_bytes"`
|
||||
ResponseSize int `json:"response_size_bytes"`
|
||||
ResponseCode string `json:"response_code"`
|
||||
Error string `json:"error,omitempty"`
|
||||
Domain string `json:"domain"`
|
||||
QueryType string `json:"query_type"`
|
||||
Protocol string `json:"protocol"`
|
||||
DNSSEC bool `json:"dnssec"`
|
||||
AuthoritativeDNSSEC bool `json:"auth_dnssec"`
|
||||
KeepAlive bool `json:"keep_alive"`
|
||||
DNSServer string `json:"dns_server"`
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Duration int64 `json:"duration_ns"`
|
||||
DurationMs float64 `json:"duration_ms"`
|
||||
RequestSize int `json:"request_size_bytes"`
|
||||
ResponseSize int `json:"response_size_bytes"`
|
||||
ResponseCode string `json:"response_code"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type MetricsWriter struct {
|
||||
@@ -39,7 +40,7 @@ func NewMetricsWriter(path string) (*MetricsWriter, error) {
|
||||
|
||||
// Write CSV header
|
||||
header := []string{
|
||||
"domain", "query_type", "protocol", "dnssec", "keep_alive",
|
||||
"domain", "query_type", "protocol", "dnssec", "auth_dnssec", "keep_alive",
|
||||
"dns_server", "timestamp", "duration_ns", "duration_ms",
|
||||
"request_size_bytes", "response_size_bytes", "response_code", "error",
|
||||
}
|
||||
@@ -63,6 +64,7 @@ func (mw *MetricsWriter) WriteMetric(metric DNSMetric) error {
|
||||
metric.QueryType,
|
||||
metric.Protocol,
|
||||
strconv.FormatBool(metric.DNSSEC),
|
||||
strconv.FormatBool(metric.AuthoritativeDNSSEC),
|
||||
strconv.FormatBool(metric.KeepAlive),
|
||||
metric.DNSServer,
|
||||
metric.Timestamp.Format(time.RFC3339),
|
||||
|
||||
Reference in New Issue
Block a user