Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

prometheusmetrics

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:20Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcActiveUsers

func ActiveUsers(ctxcontext.Context, registererprometheus.Registerer, dbdatabase.Store, durationtime.Duration) (func(),error)

ActiveUsers tracks the number of users that have authenticated within the past hour.

funcAgentStatsadded inv0.22.1

func AgentStats(ctxcontext.Context, loggerslog.Logger, registererprometheus.Registerer, dbdatabase.Store, initialCreateAftertime.Time, durationtime.Duration) (func(),error)

funcAgentsadded inv0.22.1

func Agents(ctxcontext.Context, loggerslog.Logger, registererprometheus.Registerer, dbdatabase.Store, coordinator *atomic.Pointer[tailnet.Coordinator], derpMap *tailcfg.DERPMap, agentInactiveDisconnectTimeout, durationtime.Duration) (func(),error)

Agents tracks the total number of workspaces with labels on status.

funcWorkspaces

func Workspaces(ctxcontext.Context, registererprometheus.Registerer, dbdatabase.Store, durationtime.Duration) (func(),error)

Workspaces tracks the total number of workspaces with labels on status.

Types

typeCachedGaugeVecadded inv0.22.1

type CachedGaugeVec struct {// contains filtered or unexported fields}

CachedGaugeVec is a wrapper for the prometheus.GaugeVec which allowsfor staging changes in the metrics vector. Calling "WithLabelValues(...)"will update the internal gauge value, but it will not be returned by"Collect(...)" until the "Commit()" method is called. The "Commit()" methodresets the internal gauge and applies all staged changes to it.

The Use of CachedGaugeVec is recommended for use cases when there is a riskthat the Prometheus collector receives incomplete metrics, collectedin the middle of metrics recalculation, between "Reset()" and the last"WithLabelValues()" call.

funcNewCachedGaugeVecadded inv0.22.1

func NewCachedGaugeVec(gaugeVec *prometheus.GaugeVec) *CachedGaugeVec

func (*CachedGaugeVec)Collectadded inv0.22.1

func (v *CachedGaugeVec) Collect(ch chan<-prometheus.Metric)

func (*CachedGaugeVec)Commitadded inv0.22.1

func (v *CachedGaugeVec) Commit()

Commit will set the internal value as the cached value to return from "Collect()".The internal metric value is completely reset, so the caller should expectthe gauge to be empty for the next 'WithLabelValues' values.

func (*CachedGaugeVec)Describeadded inv0.22.1

func (v *CachedGaugeVec) Describe(desc chan<- *prometheus.Desc)

func (*CachedGaugeVec)WithLabelValuesadded inv0.22.1

func (v *CachedGaugeVec) WithLabelValues(operationVectorOperation, valuefloat64, labelValues ...string)

typeMetricsAggregatoradded inv0.23.1

type MetricsAggregator struct {// contains filtered or unexported fields}

funcNewMetricsAggregatoradded inv0.23.1

func NewMetricsAggregator(loggerslog.Logger, registererprometheus.Registerer, durationtime.Duration) (*MetricsAggregator,error)

func (*MetricsAggregator)Collectadded inv0.23.1

func (ma *MetricsAggregator) Collect(ch chan<-prometheus.Metric)

func (*MetricsAggregator)Describeadded inv0.23.1

func (*MetricsAggregator) Describe(_ chan<- *prometheus.Desc)

Describe function does not have any knowledge about the metrics schema,so it does not emit anything.

func (*MetricsAggregator)Runadded inv0.23.1

func (ma *MetricsAggregator) Run(ctxcontext.Context) func()

func (*MetricsAggregator)Updateadded inv0.23.1

func (ma *MetricsAggregator) Update(ctxcontext.Context, username, workspaceName, agentNamestring, metrics []agentsdk.AgentMetric)

typeVectorOperationadded inv0.22.1

type VectorOperationint
const (VectorOperationAddVectorOperation =iotaVectorOperationSet)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp