prometheusmetrics

package
v1.200.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	Registerer prometheus.Registerer
	Gatherer   *prometheus.Registry
	// contains filtered or unexported fields
}

Metrics defines the Prometheus metrics backing the MetricsEngine implementation.

func NewMetrics

func NewMetrics(cfg config.PrometheusMetrics, disabledMetrics config.DisabledMetrics, syncerKeys []string) *Metrics

NewMetrics initializes a new Prometheus metrics instance with preloaded label values.

func (*Metrics) RecordAccountCacheResult

func (m *Metrics) RecordAccountCacheResult(cacheResult metrics.CacheResult, inc int)

func (*Metrics) RecordAdapterBidReceived

func (m *Metrics) RecordAdapterBidReceived(labels metrics.AdapterLabels, bidType openrtb_ext.BidType, hasAdm bool)

func (*Metrics) RecordAdapterConnections

func (m *Metrics) RecordAdapterConnections(adapterName openrtb_ext.BidderName, connWasReused bool, connWaitTime time.Duration)

Keeps track of created and reused connections to adapter bidders and the time from the connection request, to the connection creation, or reuse from the pool across all engines

func (*Metrics) RecordAdapterDuplicateBidID

func (m *Metrics) RecordAdapterDuplicateBidID(adaptor string, collisions int)

RecordAdapterDuplicateBidID captures the bid.ID collisions when adaptor gives the bid response with multiple bids containing same bid.ID ensure collisions value is greater than 1. This function will not give any error if collisions = 1 is passed

func (*Metrics) RecordAdapterGDPRRequestBlocked

func (m *Metrics) RecordAdapterGDPRRequestBlocked(adapterName openrtb_ext.BidderName)

func (*Metrics) RecordAdapterPanic

func (m *Metrics) RecordAdapterPanic(labels metrics.AdapterLabels)

func (*Metrics) RecordAdapterPrice

func (m *Metrics) RecordAdapterPrice(labels metrics.AdapterLabels, cpm float64)

func (*Metrics) RecordAdapterRequest

func (m *Metrics) RecordAdapterRequest(labels metrics.AdapterLabels)

func (*Metrics) RecordAdapterTime

func (m *Metrics) RecordAdapterTime(labels metrics.AdapterLabels, length time.Duration)

func (*Metrics) RecordAdapterVideoBidDuration

func (m *Metrics) RecordAdapterVideoBidDuration(labels metrics.AdapterLabels, videoBidDuration int)

RecordAdapterVideoBidDuration records actual ad duration (>0) returned by the bidder

func (*Metrics) RecordAdsCertReq

func (m *Metrics) RecordAdsCertReq(success bool)

func (*Metrics) RecordAdsCertSignTime

func (m *Metrics) RecordAdsCertSignTime(adsCertSignTime time.Duration)

func (*Metrics) RecordConnectionAccept

func (m *Metrics) RecordConnectionAccept(success bool)

func (*Metrics) RecordConnectionClose

func (m *Metrics) RecordConnectionClose(success bool)

func (*Metrics) RecordCookieSync

func (m *Metrics) RecordCookieSync(status metrics.CookieSyncStatus)

func (*Metrics) RecordDNSTime

func (m *Metrics) RecordDNSTime(dnsLookupTime time.Duration)

func (*Metrics) RecordDebugRequest

func (m *Metrics) RecordDebugRequest(debugEnabled bool, pubID string)

func (*Metrics) RecordFloorsRequestForAccount

func (m *Metrics) RecordFloorsRequestForAccount(pubId string)

func (*Metrics) RecordImps

func (m *Metrics) RecordImps(labels metrics.ImpLabels)

func (*Metrics) RecordPodCombGenTime

func (m *Metrics) RecordPodCombGenTime(labels metrics.PodLabels, elapsedTime time.Duration)

RecordPodCombGenTime records number of combinations generated and time taken by underneath algorithm to generate them

func (*Metrics) RecordPodCompititveExclusionTime

func (m *Metrics) RecordPodCompititveExclusionTime(labels metrics.PodLabels, elapsedTime time.Duration)

RecordPodCompititveExclusionTime records number of combinations comsumed for forming final ad pod response and time taken by underneath algorithm to generate them

func (*Metrics) RecordPodImpGenTime

func (m *Metrics) RecordPodImpGenTime(labels metrics.PodLabels, start time.Time)

RecordPodImpGenTime records number of impressions generated and time taken by underneath algorithm to generate them

func (*Metrics) RecordPrebidCacheRequestTime

func (m *Metrics) RecordPrebidCacheRequestTime(success bool, length time.Duration)

func (*Metrics) RecordRejectedBidsForAccount

func (m *Metrics) RecordRejectedBidsForAccount(pubId string)

func (*Metrics) RecordRejectedBidsForBidder

func (m *Metrics) RecordRejectedBidsForBidder(Adapter openrtb_ext.BidderName)

func (*Metrics) RecordRequest

func (m *Metrics) RecordRequest(labels metrics.Labels)

func (*Metrics) RecordRequestHavingDuplicateBidID

func (m *Metrics) RecordRequestHavingDuplicateBidID()

RecordRequestHavingDuplicateBidID keeps count of request when duplicate bid.id is detected in partner's response

func (*Metrics) RecordRequestPrivacy

func (m *Metrics) RecordRequestPrivacy(privacy metrics.PrivacyLabels)

func (*Metrics) RecordRequestQueueTime

func (m *Metrics) RecordRequestQueueTime(success bool, requestType metrics.RequestType, length time.Duration)

func (*Metrics) RecordRequestTime

func (m *Metrics) RecordRequestTime(labels metrics.Labels, length time.Duration)

func (*Metrics) RecordSetUid

func (m *Metrics) RecordSetUid(status metrics.SetUidStatus)

func (*Metrics) RecordStoredDataError

func (m *Metrics) RecordStoredDataError(labels metrics.StoredDataLabels)

func (*Metrics) RecordStoredDataFetchTime

func (m *Metrics) RecordStoredDataFetchTime(labels metrics.StoredDataLabels, length time.Duration)

func (*Metrics) RecordStoredImpCacheResult

func (m *Metrics) RecordStoredImpCacheResult(cacheResult metrics.CacheResult, inc int)

func (*Metrics) RecordStoredReqCacheResult

func (m *Metrics) RecordStoredReqCacheResult(cacheResult metrics.CacheResult, inc int)

func (*Metrics) RecordStoredResponse

func (m *Metrics) RecordStoredResponse(pubId string)

func (*Metrics) RecordSyncerRequest

func (m *Metrics) RecordSyncerRequest(key string, status metrics.SyncerCookieSyncStatus)

func (*Metrics) RecordSyncerSet

func (m *Metrics) RecordSyncerSet(key string, status metrics.SyncerSetUidStatus)

func (*Metrics) RecordTLSHandshakeTime

func (m *Metrics) RecordTLSHandshakeTime(adapterName openrtb_ext.BidderName, tlsHandshakeTime time.Duration)

func (*Metrics) RecordTimeoutNotice

func (m *Metrics) RecordTimeoutNotice(success bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL