Documentation
¶
Overview ¶
Code generated by util/telemetry/builder. DO NOT EDIT.
Code generated by util/telemetry/builder. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func AddDeprecationCounter(_ context.Context, m *Metrics) error
- func AddVersion(ctx context.Context, m *Metrics) error
- func WithAsBuiltIn() instrumentOption
- func WithDefaultBuckets(buckets []float64) instrumentOption
- type AddMetric
- type BuiltinAttribute
- type BuiltinInstrument
- type Config
- type InstAttrib
- type InstAttribs
- type Instrument
- func (i *Instrument) AddInt(ctx context.Context, val int64, attribs InstAttribs)
- func (i *Instrument) GetDescription() string
- func (i *Instrument) GetName() string
- func (i *Instrument) GetOtel() interface{}
- func (i *Instrument) GetUserdata() interface{}
- func (i *Instrument) ObserveFloat(o metric.Observer, val float64, attribs InstAttribs)
- func (i *Instrument) ObserveInt(o metric.Observer, val int64, attribs InstAttribs)
- func (i *Instrument) Record(ctx context.Context, val float64, attribs InstAttribs)
- func (i *Instrument) RegisterCallback(m *Metrics, f metric.Callback) error
- func (i *Instrument) SetUserdata(data interface{})
- type Metrics
- func (m *Metrics) AddInstrument(name string, inst *Instrument)
- func (m *Metrics) AddInt(ctx context.Context, name string, val int64, attribs InstAttribs)
- func (m *Metrics) CreateBuiltinInstrument(instrument BuiltinInstrument, opts ...instrumentOption) error
- func (m *Metrics) CreateInstrument(instType instrumentType, name, desc, unit string, options ...instrumentOption) error
- func (m *Metrics) DeprecatedFeature(ctx context.Context, deprecation string, namespace string)
- func (m *Metrics) GetInstrument(name string) *Instrument
- func (m *Metrics) IterateROInstruments(fn func(i *Instrument))
- func (m *Metrics) Populate(ctx context.Context, adders ...AddMetric) error
- func (m *Metrics) Record(ctx context.Context, name string, val float64, attribs InstAttribs)
- func (m *Metrics) RunPrometheusServer(ctx context.Context, isDummy bool)
- type Modifier
- type TestMetricsExporter
- func (t *TestMetricsExporter) GetFloat64CounterValue(name string, attribs *attribute.Set) (float64, error)
- func (t *TestMetricsExporter) GetFloat64GaugeValue(name string, attribs *attribute.Set) (float64, error)
- func (t *TestMetricsExporter) GetFloat64HistogramData(name string, attribs *attribute.Set) (*metricdata.HistogramDataPoint[float64], error)
- func (t *TestMetricsExporter) GetInt64CounterValue(name string, attribs *attribute.Set) (int64, error)
- func (t *TestMetricsExporter) GetInt64GaugeValue(name string, attribs *attribute.Set) (int64, error)
Constants ¶
const ( AttribBuildCompiler string = `compiler` AttribBuildDate string = `build_date` AttribBuildGitCommit string = `git_commit` AttribBuildGitTag string = `git_tag` AttribBuildGitTreeState string = `git_tree_state` AttribBuildGoVersion string = `go_version` AttribBuildPlatform string = `platform` AttribBuildVersion string = `version` AttribConcurrencyPolicy string = `concurrency_policy` AttribCronWFName string = `name` AttribCronWFNamespace string = `namespace` AttribDeprecatedFeature string = `feature` AttribErrorCause string = `cause` AttribLogLevel string = `level` AttribNodePhase string = `node_phase` AttribPodNamespace string = `namespace` AttribPodPendingReason string = `reason` AttribPodPhase string = `phase` AttribQueueName string = `queue_name` AttribRecentlyStarted string = `recently_started` AttribRequestCode string = `status_code` AttribRequestKind string = `kind` AttribRequestVerb string = `verb` AttribTemplateCluster string = `cluster_scope` AttribTemplateName string = `name` AttribTemplateNamespace string = `namespace` AttribWorkerType string = `worker_type` AttribWorkflowNamespace string = `namespace` AttribWorkflowPhase string = `phase` AttribWorkflowStatus string = `status` AttribWorkflowType string = `type` )
const ( DefaultPrometheusServerPort = 9090 DefaultPrometheusServerPath = "/metrics" )
const ( Float64ObservableGauge instrumentType = iota Float64Histogram Float64ObservableCounter Int64ObservableGauge Int64UpDownCounter Int64Counter )
const TestScopeName string = "argo-workflows-test"
TestScopeName is the name that the metrics running under test will have
Variables ¶
var InstrumentCronworkflowsConcurrencypolicyTriggered = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentCronworkflowsTriggeredTotal = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentDeprecatedFeature = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentErrorCount = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentGauge = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentIsLeader = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentK8sRequestDuration = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentK8sRequestTotal = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentLogMessages = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentOperationDurationSeconds = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentPodMissing = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentPodPendingCount = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentPodsGauge = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentPodsTotalCount = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentQueueAddsCount = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentQueueDepthGauge = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentQueueDuration = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentQueueLatency = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentQueueLongestRunning = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentQueueRetries = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentQueueUnfinishedWork = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentTotalCount = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentVersion = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentWorkersBusyCount = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentWorkflowCondition = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentWorkflowtemplateRuntime = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentWorkflowtemplateTriggeredTotal = BuiltinInstrument{ // contains filtered or unexported fields }
Functions ¶
func WithAsBuiltIn ¶
func WithAsBuiltIn() instrumentOption
func WithDefaultBuckets ¶
func WithDefaultBuckets(buckets []float64) instrumentOption
Types ¶
type BuiltinAttribute ¶ added in v3.7.0
type BuiltinAttribute struct {
// contains filtered or unexported fields
}
type BuiltinInstrument ¶ added in v3.7.0
type BuiltinInstrument struct {
// contains filtered or unexported fields
}
func (*BuiltinInstrument) Name ¶ added in v3.7.0
func (bi *BuiltinInstrument) Name() string
type InstAttrib ¶
type InstAttrib struct {
Name string
Value interface{}
}
type InstAttribs ¶
type InstAttribs []InstAttrib
type Instrument ¶
type Instrument struct {
// contains filtered or unexported fields
}
func (*Instrument) AddInt ¶
func (i *Instrument) AddInt(ctx context.Context, val int64, attribs InstAttribs)
func (*Instrument) GetDescription ¶
func (i *Instrument) GetDescription() string
func (*Instrument) GetName ¶
func (i *Instrument) GetName() string
func (*Instrument) GetOtel ¶
func (i *Instrument) GetOtel() interface{}
func (*Instrument) GetUserdata ¶
func (i *Instrument) GetUserdata() interface{}
func (*Instrument) ObserveFloat ¶
func (i *Instrument) ObserveFloat(o metric.Observer, val float64, attribs InstAttribs)
func (*Instrument) ObserveInt ¶
func (i *Instrument) ObserveInt(o metric.Observer, val int64, attribs InstAttribs)
func (*Instrument) Record ¶
func (i *Instrument) Record(ctx context.Context, val float64, attribs InstAttribs)
func (*Instrument) RegisterCallback ¶
func (i *Instrument) RegisterCallback(m *Metrics, f metric.Callback) error
func (*Instrument) SetUserdata ¶
func (i *Instrument) SetUserdata(data interface{})
type Metrics ¶
type Metrics struct {
// Evil context for compatibility with legacy context free interfaces
Ctx context.Context
// contains filtered or unexported fields
}
func NewMetrics ¶
func (*Metrics) AddInstrument ¶ added in v3.6.3
func (m *Metrics) AddInstrument(name string, inst *Instrument)
func (*Metrics) CreateBuiltinInstrument ¶ added in v3.7.0
func (m *Metrics) CreateBuiltinInstrument(instrument BuiltinInstrument, opts ...instrumentOption) error
CreateBuiltinInstrument adds a yaml defined builtin instrument opts parameter is for legacy metrics, do not use for new metrics
func (*Metrics) CreateInstrument ¶
func (*Metrics) DeprecatedFeature ¶
func (*Metrics) GetInstrument ¶ added in v3.6.3
func (m *Metrics) GetInstrument(name string) *Instrument
func (*Metrics) IterateROInstruments ¶ added in v3.6.3
func (m *Metrics) IterateROInstruments(fn func(i *Instrument))
IterateROInstruments iterates over every instrument for Read-Only purposes
type TestMetricsExporter ¶
TestExporter is an opentelemetry metrics exporter, purely for use within tests. It is not possible to query the values of an instrument via the otel SDK, so this exporter provides methods by which you can request metrics by name+attributes and therefore inspect whether they exist, and their values for the purposes of testing only. This is a public structure as it is used outside of this module also.
func NewTestMetricsExporter ¶
func NewTestMetricsExporter() *TestMetricsExporter
func (*TestMetricsExporter) GetFloat64CounterValue ¶
func (t *TestMetricsExporter) GetFloat64CounterValue(name string, attribs *attribute.Set) (float64, error)
GetFloat64CounterValue returns an otel float64 counter value for test reads
func (*TestMetricsExporter) GetFloat64GaugeValue ¶
func (t *TestMetricsExporter) GetFloat64GaugeValue(name string, attribs *attribute.Set) (float64, error)
GetFloat64GaugeValue returns an otel float64 gauge value for test reads
func (*TestMetricsExporter) GetFloat64HistogramData ¶
func (t *TestMetricsExporter) GetFloat64HistogramData(name string, attribs *attribute.Set) (*metricdata.HistogramDataPoint[float64], error)
GetFloat64HistogramData returns an otel histogram float64 data point for test reads
func (*TestMetricsExporter) GetInt64CounterValue ¶
func (t *TestMetricsExporter) GetInt64CounterValue(name string, attribs *attribute.Set) (int64, error)
GetInt64CounterValue returns an otel int64 counter value for test reads
func (*TestMetricsExporter) GetInt64GaugeValue ¶
func (t *TestMetricsExporter) GetInt64GaugeValue(name string, attribs *attribute.Set) (int64, error)
GetInt64GaugeValue returns an otel int64 gauge value for test reads