Documentation ¶
Index ¶
- Variables
- func CountQueries(conn db.Conn) db.Conn
- func LogLockAcquired(logger lager.Logger, lockID lock.LockID)
- func LogLockReleased(logger lager.Logger, lockID lock.LockID)
- func PeriodicallyEmit(logger lager.Logger, m *Monitor, interval time.Duration) ifrit.Runner
- func WrapHandler(logger lager.Logger, monitor *Monitor, route string, handler http.Handler) http.Handler
- type ArtifactCollectorDuration
- type BuildCollectorDuration
- type BuildFinished
- type BuildStarted
- type ContainerCollectorDuration
- type Counter
- type CreatedContainersToBeGarbageCollected
- type CreatedVolumesToBeGarbageCollected
- type CreatingContainersToBeGarbageCollected
- type DestroyingContainersToBeGarbageCollected
- type DestroyingVolumesToBeGarbageCollected
- type Emitter
- type EmitterFactory
- type ErrorLog
- type ErrorSinkCollector
- type Event
- type FailedContainersToBeGarbageCollected
- type FailedVolumesToBeGarbageCollected
- type GarbageCollectionContainerCollectorJobDropped
- type Gauge
- type HTTPResponseTime
- type LockAcquired
- type LockReleased
- type MetricsHandler
- type Monitor
- type ResourceCacheCollectorDuration
- type ResourceCacheUseCollectorDuration
- type ResourceConfigCheckSessionCollectorDuration
- type ResourceConfigCollectorDuration
- type SchedulingJobDuration
- type TasksWaitingDuration
- type TasksWaitingLabels
- type VolumeCollectorDuration
- type VolumesToBeGarbageCollected
- type WorkerCollectorDuration
- type WorkerContainers
- type WorkerTasks
- type WorkerUnknownContainers
- type WorkerUnknownVolumes
- type WorkerVolumes
- type WorkersState
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFailedToEmit = errors.New("failed to emit metric")
View Source
var Metrics = NewMonitor()
Functions ¶
func PeriodicallyEmit ¶
Types ¶
type ArtifactCollectorDuration ¶
func (ArtifactCollectorDuration) Emit ¶
func (event ArtifactCollectorDuration) Emit(logger lager.Logger)
type BuildCollectorDuration ¶
func (BuildCollectorDuration) Emit ¶
func (event BuildCollectorDuration) Emit(logger lager.Logger)
type BuildFinished ¶
func (BuildFinished) Emit ¶
func (event BuildFinished) Emit(logger lager.Logger)
type BuildStarted ¶
func (BuildStarted) Emit ¶
func (event BuildStarted) Emit(logger lager.Logger)
type ContainerCollectorDuration ¶
func (ContainerCollectorDuration) Emit ¶
func (event ContainerCollectorDuration) Emit(logger lager.Logger)
type CreatedContainersToBeGarbageCollected ¶
type CreatedContainersToBeGarbageCollected struct {
Containers int
}
func (CreatedContainersToBeGarbageCollected) Emit ¶
func (event CreatedContainersToBeGarbageCollected) Emit(logger lager.Logger)
type CreatedVolumesToBeGarbageCollected ¶
type CreatedVolumesToBeGarbageCollected struct {
Volumes int
}
func (CreatedVolumesToBeGarbageCollected) Emit ¶
func (event CreatedVolumesToBeGarbageCollected) Emit(logger lager.Logger)
type CreatingContainersToBeGarbageCollected ¶
type CreatingContainersToBeGarbageCollected struct {
Containers int
}
func (CreatingContainersToBeGarbageCollected) Emit ¶
func (event CreatingContainersToBeGarbageCollected) Emit(logger lager.Logger)
type DestroyingContainersToBeGarbageCollected ¶
type DestroyingContainersToBeGarbageCollected struct {
Containers int
}
func (DestroyingContainersToBeGarbageCollected) Emit ¶
func (event DestroyingContainersToBeGarbageCollected) Emit(logger lager.Logger)
type DestroyingVolumesToBeGarbageCollected ¶
type DestroyingVolumesToBeGarbageCollected struct {
Volumes int
}
func (DestroyingVolumesToBeGarbageCollected) Emit ¶
func (event DestroyingVolumesToBeGarbageCollected) Emit(logger lager.Logger)
type EmitterFactory ¶
type ErrorSinkCollector ¶
type ErrorSinkCollector struct {
// contains filtered or unexported fields
}
func NewErrorSinkCollector ¶
func NewErrorSinkCollector(logger lager.Logger, m *Monitor) ErrorSinkCollector
func (*ErrorSinkCollector) Log ¶
func (c *ErrorSinkCollector) Log(f lager.LogFormat)
type FailedContainersToBeGarbageCollected ¶
type FailedContainersToBeGarbageCollected struct {
Containers int
}
func (FailedContainersToBeGarbageCollected) Emit ¶
func (event FailedContainersToBeGarbageCollected) Emit(logger lager.Logger)
type FailedVolumesToBeGarbageCollected ¶
type FailedVolumesToBeGarbageCollected struct {
Volumes int
}
func (FailedVolumesToBeGarbageCollected) Emit ¶
func (event FailedVolumesToBeGarbageCollected) Emit(logger lager.Logger)
type GarbageCollectionContainerCollectorJobDropped ¶
type GarbageCollectionContainerCollectorJobDropped struct {
WorkerName string
}
func (GarbageCollectionContainerCollectorJobDropped) Emit ¶
func (event GarbageCollectionContainerCollectorJobDropped) Emit(logger lager.Logger)
type HTTPResponseTime ¶
type LockAcquired ¶
type LockAcquired struct {
LockType string
}
func (LockAcquired) Emit ¶
func (event LockAcquired) Emit(logger lager.Logger)
type LockReleased ¶
type LockReleased struct {
LockType string
}
func (LockReleased) Emit ¶
func (event LockReleased) Emit(logger lager.Logger)
type MetricsHandler ¶
type MetricsHandler struct { Logger lager.Logger Route string Handler http.Handler Monitor *Monitor }
func (MetricsHandler) ServeHTTP ¶
func (handler MetricsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Monitor ¶
type Monitor struct { Databases []db.Conn DatabaseQueries Counter ContainersCreated Counter VolumesCreated Counter FailedContainers Counter FailedVolumes Counter ContainersDeleted Counter VolumesDeleted Counter ChecksDeleted Counter JobsScheduled Counter JobsScheduling Gauge BuildsStarted Counter BuildsRunning Gauge TasksWaiting map[TasksWaitingLabels]*Gauge ChecksFinishedWithError Counter ChecksFinishedWithSuccess Counter ChecksStarted Counter ChecksEnqueued Counter ConcurrentRequests map[string]*Gauge ConcurrentRequestsLimitHit map[string]*Counter VolumesStreamed Counter // contains filtered or unexported fields }
func NewMonitor ¶
func NewMonitor() *Monitor
func (*Monitor) Initialize ¶
func (*Monitor) RegisterEmitter ¶
func (m *Monitor) RegisterEmitter(factory EmitterFactory)
func (*Monitor) WireEmitters ¶
type ResourceCacheCollectorDuration ¶
func (ResourceCacheCollectorDuration) Emit ¶
func (event ResourceCacheCollectorDuration) Emit(logger lager.Logger)
type ResourceCacheUseCollectorDuration ¶
func (ResourceCacheUseCollectorDuration) Emit ¶
func (event ResourceCacheUseCollectorDuration) Emit(logger lager.Logger)
type ResourceConfigCheckSessionCollectorDuration ¶
func (ResourceConfigCheckSessionCollectorDuration) Emit ¶
func (event ResourceConfigCheckSessionCollectorDuration) Emit(logger lager.Logger)
type ResourceConfigCollectorDuration ¶
func (ResourceConfigCollectorDuration) Emit ¶
func (event ResourceConfigCollectorDuration) Emit(logger lager.Logger)
type SchedulingJobDuration ¶
type SchedulingJobDuration struct { PipelineName string JobName string JobID int Duration time.Duration }
func (SchedulingJobDuration) Emit ¶
func (event SchedulingJobDuration) Emit(logger lager.Logger)
type TasksWaitingDuration ¶
type TasksWaitingDuration struct { Labels TasksWaitingLabels Duration time.Duration }
func (TasksWaitingDuration) Emit ¶
func (event TasksWaitingDuration) Emit(logger lager.Logger)
type TasksWaitingLabels ¶
type VolumeCollectorDuration ¶
func (VolumeCollectorDuration) Emit ¶
func (event VolumeCollectorDuration) Emit(logger lager.Logger)
type VolumesToBeGarbageCollected ¶
type VolumesToBeGarbageCollected struct {
Volumes int
}
func (VolumesToBeGarbageCollected) Emit ¶
func (event VolumesToBeGarbageCollected) Emit(logger lager.Logger)
type WorkerCollectorDuration ¶
func (WorkerCollectorDuration) Emit ¶
func (event WorkerCollectorDuration) Emit(logger lager.Logger)
type WorkerContainers ¶
type WorkerContainers struct { WorkerName string Platform string Containers int TeamName string Tags []string }
func (WorkerContainers) Emit ¶
func (event WorkerContainers) Emit(logger lager.Logger)
type WorkerTasks ¶
func (WorkerTasks) Emit ¶
func (event WorkerTasks) Emit(logger lager.Logger)
type WorkerUnknownContainers ¶
func (WorkerUnknownContainers) Emit ¶
func (event WorkerUnknownContainers) Emit(logger lager.Logger)
type WorkerUnknownVolumes ¶
func (WorkerUnknownVolumes) Emit ¶
func (event WorkerUnknownVolumes) Emit(logger lager.Logger)
type WorkerVolumes ¶
type WorkerVolumes struct { WorkerName string Platform string Volumes int TeamName string Tags []string }
func (WorkerVolumes) Emit ¶
func (event WorkerVolumes) Emit(logger lager.Logger)
type WorkersState ¶
type WorkersState struct {
WorkerStateByName map[string]db.WorkerState
}
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
emitterfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.