istio.io/istio@v0.0.0-20240520182934-d79c90f27776/pkg/dns/client/monitoring.go (about) 1 // Copyright Istio Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package client 16 17 import ( 18 "istio.io/istio/pkg/monitoring" 19 ) 20 21 var ( 22 requests = monitoring.NewSum( 23 "dns_requests_total", 24 "Total number of DNS requests.", 25 ) 26 27 upstreamRequests = monitoring.NewSum( 28 "dns_upstream_requests_total", 29 "Total number of DNS requests forwarded to upstream.", 30 ) 31 32 failures = monitoring.NewSum( 33 "dns_upstream_failures_total", 34 "Total number of DNS failures.", 35 ) 36 37 requestDuration = monitoring.NewDistribution( 38 "dns_upstream_request_duration_seconds", 39 "Total time in seconds Istio takes to get DNS response from upstream.", 40 []float64{.001, .005, 0.01, 0.1, 1, 5}, 41 ) 42 )