Documentation ¶
Index ¶
- Constants
- Variables
- func GetAdscertMetricsRegistry() *prometheus.Registry
- func RecordDNSLookup(err adscerterrors.DNSLookupErrorCode)
- func RecordDNSLookupTime(observeTime time.Duration)
- func RecordSigning(err adscerterrors.SigningErrorCode)
- func RecordSigningTime(observeTime time.Duration)
- func RecordVerify(err adscerterrors.VerifyErrorCode)
- func RecordVerifyOutcome(t verifyOutcomeType, valid bool)
- func RecordVerifyTime(observeTime time.Duration)
Constants ¶
View Source
const ( VerifyOutcomeTypeBody verifyOutcomeType = "body" VerifyOutcomeTypeUrl verifyOutcomeType = "url" )
Variables ¶
View Source
var ( DNSLookupCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "dns_lookup_count", Help: "The total number of requests verified", }, []string{dnsLookupErrorLabel}) DNSLookupTimeHistogram = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: namespace, Name: "dns_lookup_ms", Help: "Milliseconds to lookup DNS.", Buckets: standardMillisecondBuckets, }) SignCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "sign_count", Help: "The total number of requests signed.", }, []string{signErrorLabel}) SignTimeHistogram = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: namespace, Name: "sign_time_us", Help: "Microseconds to sign a request.", Buckets: standardMicrosecondBuckets, }) VerifyCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "verify_count", Help: "The total number of requests verified.", }, []string{verifyErrorLabel}) VerifyOutcomeCounter = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "verify_outcome_count", Help: "The total number of valid signed requests.", }, []string{verifyOutcomeTypeLabel, verifyOutcomeValidLabel}) VerifyTimeHistogram = prometheus.NewHistogram(prometheus.HistogramOpts{ Namespace: namespace, Name: "verify_time_us", Help: "Microseconds to verify a request.", Buckets: standardMicrosecondBuckets, }) )
Creates all metrics
Functions ¶
func GetAdscertMetricsRegistry ¶
func GetAdscertMetricsRegistry() *prometheus.Registry
func RecordDNSLookup ¶
func RecordDNSLookup(err adscerterrors.DNSLookupErrorCode)
func RecordDNSLookupTime ¶
func RecordSigning ¶
func RecordSigning(err adscerterrors.SigningErrorCode)
func RecordSigningTime ¶
func RecordVerify ¶
func RecordVerify(err adscerterrors.VerifyErrorCode)
func RecordVerifyOutcome ¶
func RecordVerifyOutcome(t verifyOutcomeType, valid bool)
func RecordVerifyTime ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.