Documentation
¶
Overview ¶
Code generated by util/telemetry/builder. DO NOT EDIT.
Code generated by util/telemetry/builder. DO NOT EDIT.
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
- type AddMetric
- type Attribute
- type Attributes
- type BuiltinAttribute
- type BuiltinInstrument
- type Carrier
- type DeprecatedFeatureMetricOption
- type InstAttrib
- type InstAttribs
- type Instrument
- func (i *Instrument) AddInt(ctx context.Context, val int64, attribs Attributes)
- func (i *Instrument) GetDescription() string
- func (i *Instrument) GetName() string
- func (i *Instrument) GetOtel() any
- func (i *Instrument) GetUserdata() any
- func (i *Instrument) ObserveFloat(ctx context.Context, o metric.Observer, val float64, attribs Attributes)
- func (i *Instrument) ObserveInt(ctx context.Context, o metric.Observer, val int64, attribs Attributes)
- func (i *Instrument) Record(ctx context.Context, val float64, attribs Attributes)
- func (i *Instrument) RegisterCallback(m *Metrics, f metric.Callback) error
- func (i *Instrument) SetUserdata(data any)
- type InstrumentOption
- type Metrics
- func (m *Metrics) AddCronworkflowsConcurrencypolicyTriggered(ctx context.Context, val int64, cronWFName string, cronWFNamespace string, ...)
- func (m *Metrics) AddCronworkflowsTriggeredTotal(ctx context.Context, val int64, cronWFName string, cronWFNamespace string)
- func (m *Metrics) AddDeprecatedFeature(ctx context.Context, val int64, deprecatedFeature string, ...)
- func (m *Metrics) AddErrorCount(ctx context.Context, val int64, errorCause string)
- func (m *Metrics) AddInstrument(name string, inst *Instrument)
- func (m *Metrics) AddInt(ctx context.Context, name string, val int64, attribs Attributes)
- func (m *Metrics) AddK8sRequestTotal(ctx context.Context, val int64, requestKind string, requestVerb string, ...)
- func (m *Metrics) AddLocksTakenTotal(ctx context.Context, val int64, lockType string, lockStorage string, ...)
- func (m *Metrics) AddLogMessages(ctx context.Context, val int64, logLevel string)
- func (m *Metrics) AddPodMissing(ctx context.Context, val int64, nodePhase string, recentlyStarted bool)
- func (m *Metrics) AddPodPendingCount(ctx context.Context, val int64, podPendingReason string, podNamespace string)
- func (m *Metrics) AddPodRestartsTotal(ctx context.Context, val int64, podRestartReason string, podNamespace string, ...)
- func (m *Metrics) AddPodsTotalCount(ctx context.Context, val int64, podPhase string, podNamespace string)
- func (m *Metrics) AddQueueAddsCount(ctx context.Context, val int64, queueName string)
- func (m *Metrics) AddQueueDepthGauge(ctx context.Context, val int64, queueName string)
- func (m *Metrics) AddQueueRetries(ctx context.Context, val int64, queueName string)
- func (m *Metrics) AddTotalCount(ctx context.Context, val int64, workflowPhase string, workflowNamespace string)
- func (m *Metrics) AddVersion(ctx context.Context, val int64, buildVersion string, buildPlatform string, ...)
- func (m *Metrics) AddWorkersBusyCount(ctx context.Context, val int64, workerType string)
- func (m *Metrics) AddWorkflowtemplateTriggeredTotal(ctx context.Context, val int64, templateName string, templateNamespace string, ...)
- 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) ObserveGauge(ctx context.Context, o metric.Observer, val int64, workflowPhase string)
- func (m *Metrics) ObserveIsLeader(ctx context.Context, o metric.Observer, val int64)
- func (m *Metrics) ObserveLocksHeld(ctx context.Context, o metric.Observer, val int64, lockType string, ...)
- func (m *Metrics) ObserveLocksPending(ctx context.Context, o metric.Observer, val int64, lockType string, ...)
- func (m *Metrics) ObservePodsGauge(ctx context.Context, o metric.Observer, val int64, podPhase string)
- func (m *Metrics) ObserveQueueLongestRunning(ctx context.Context, o metric.Observer, val float64, queueName string)
- func (m *Metrics) ObserveQueueUnfinishedWork(ctx context.Context, o metric.Observer, val float64, queueName string)
- func (m *Metrics) ObserveWorkflowCondition(ctx context.Context, o metric.Observer, val int64, workflowType string, ...)
- func (m *Metrics) Populate(ctx context.Context, adders ...AddMetric) error
- func (m *Metrics) Record(ctx context.Context, name string, val float64, attribs Attributes)
- func (m *Metrics) RecordClientRateLimiterLatency(ctx context.Context, val float64)
- func (m *Metrics) RecordK8sRequestDuration(ctx context.Context, val float64, requestKind string, requestVerb string, ...)
- func (m *Metrics) RecordOperationDurationSeconds(ctx context.Context, val float64)
- func (m *Metrics) RecordQueueDuration(ctx context.Context, val float64, queueName string)
- func (m *Metrics) RecordQueueLatency(ctx context.Context, val float64, queueName string)
- func (m *Metrics) RecordResourceRateLimiterLatency(ctx context.Context, val float64)
- func (m *Metrics) RecordWorkflowtemplateRuntime(ctx context.Context, val float64, templateName string, ...)
- func (m *Metrics) RunPrometheusServer(ctx context.Context, isDummy bool)
- func (m *Metrics) Shutdown(ctx context.Context) error
- type MetricsConfig
- type MetricsModifier
- type NodePhaseSpanOption
- type PodRestartsTotalMetricOption
- type Span
- type Spans
- type TestMetricsExporter
- func (t *TestMetricsExporter) GetFloat64CounterValue(ctx context.Context, name string, attribs *attribute.Set) (float64, error)
- func (t *TestMetricsExporter) GetFloat64GaugeValue(ctx context.Context, name string, attribs *attribute.Set) (float64, error)
- func (t *TestMetricsExporter) GetFloat64HistogramData(ctx context.Context, name string, attribs *attribute.Set) (*metricdata.HistogramDataPoint[float64], error)
- func (t *TestMetricsExporter) GetInt64CounterValue(ctx context.Context, name string, attribs *attribute.Set) (int64, error)
- func (t *TestMetricsExporter) GetInt64GaugeValue(ctx context.Context, name string, attribs *attribute.Set) (int64, error)
- type TestTracingExporter
- func (t *TestTracingExporter) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error
- func (t *TestTracingExporter) GetChildSpans(parentSpanID trace.SpanID) []sdktrace.ReadOnlySpan
- func (t *TestTracingExporter) GetRootSpans() []sdktrace.ReadOnlySpan
- func (t *TestTracingExporter) GetSpanByName(name string) (sdktrace.ReadOnlySpan, error)
- func (t *TestTracingExporter) GetSpanByNameAndAttributes(name string, attribs *attribute.Set) (sdktrace.ReadOnlySpan, error)
- func (t *TestTracingExporter) GetSpans() []sdktrace.ReadOnlySpan
- func (t *TestTracingExporter) GetSpansByName(name string) []sdktrace.ReadOnlySpan
- func (t *TestTracingExporter) Reset()
- func (t *TestTracingExporter) Shutdown(ctx context.Context) error
- func (t *TestTracingExporter) SpanCount() int
- type Tracing
- func (*Tracing) BreakTrace(ctx context.Context) context.Context
- func (t *Tracing) Shutdown(ctx context.Context) error
- func (t *Tracing) StartArchiveArtifact(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartCaptureScriptResult(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartCreateTaskResult(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartCreateWorkflowPod(ctx context.Context, nodeID string) (context.Context, trace.Span)
- func (t *Tracing) StartLoadArtifact(ctx context.Context, artifactPath string) (context.Context, trace.Span)
- func (t *Tracing) StartLoadArtifacts(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartNode(ctx context.Context, nodeID string, workflowName string, ...) (context.Context, trace.Span)
- func (t *Tracing) StartNodePhase(ctx context.Context, nodeID string, nodePhase string, ...) (context.Context, trace.Span)
- func (t *Tracing) StartPatchTaskResult(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartPatchTaskResultLabels(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartPersistUpdates(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartPodReconciliation(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartProcessDataTemplate(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartReconcileTaskResult(ctx context.Context, taskResultName string, taskResultCompleted bool) (context.Context, trace.Span)
- func (t *Tracing) StartReconcileTaskResults(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartReconcileWorkflow(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartRunInitContainer(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
- func (t *Tracing) StartRunMainContainer(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
- func (t *Tracing) StartRunSupervisorContainer(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
- func (t *Tracing) StartRunWaitContainer(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
- func (t *Tracing) StartSaveArtifact(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartSaveArtifacts(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartSaveContainerLogs(ctx context.Context, containerName string) (context.Context, trace.Span)
- func (t *Tracing) StartSaveLogs(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartStageFiles(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartStartupCacheSync(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartStartupController(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartTryAcquireLock(ctx context.Context, lockName string, lockAcquired bool) (context.Context, trace.Span)
- func (t *Tracing) StartUnarchiveArtifact(ctx context.Context, artifactArchive string) (context.Context, trace.Span)
- func (t *Tracing) StartWaitClientRateLimiter(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartWaitWorkload(ctx context.Context) (context.Context, trace.Span)
- func (t *Tracing) StartWorkflow(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
- func (t *Tracing) StartWorkflowPhase(ctx context.Context, workflowPhase string) (context.Context, trace.Span)
- type TracingConfig
- type TracingModifier
Constants ¶
const ( AttribArtifactArchive string = `archive` AttribArtifactPath string = `path` 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` AttribContainerName string = `container_name` AttribCronWFName string = `name` AttribCronWFNamespace string = `namespace` AttribDeprecatedFeature string = `feature` AttribErrorCause string = `cause` AttribLockAcquired string = `acquired` AttribLockName string = `lock_name` AttribLockNamespace string = `namespace` AttribLockStorage string = `storage` AttribLockType string = `type` AttribLogLevel string = `level` AttribMessage string = `message` AttribNodeID string = `node_id` AttribNodePhase string = `node_phase` AttribNodeType string = `node_type` AttribPodNamespace string = `namespace` AttribPodPendingReason string = `reason` AttribPodPhase string = `phase` AttribPodRestartCondition string = `condition` AttribPodRestartReason string = `reason` AttribQueueName string = `queue_name` AttribRecentlyStarted string = `recently_started` AttribRequestCode string = `status_code` AttribRequestKind string = `kind` AttribRequestVerb string = `verb` AttribTaskResultCompleted string = `completed` AttribTaskResultName string = `name` AttribTemplateCluster string = `cluster_scope` AttribTemplateName string = `name` AttribTemplateNamespace string = `namespace` AttribWorkerType string = `worker_type` AttribWorkflowName string = `name` 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
const TestTracingScopeName string = "argo-workflows-test"
TestTracingScopeName is the name that the tracing running under test will have
Variables ¶
var AnyParent = Spans{ &SpanWaitClientRateLimiter, }
var InstrumentClientRateLimiterLatency = BuiltinInstrument{ // contains filtered or unexported fields }
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 InstrumentLocksHeld = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentLocksPending = BuiltinInstrument{ // contains filtered or unexported fields }
var InstrumentLocksTakenTotal = 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 InstrumentPodRestartsTotal = 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 InstrumentResourceRateLimiterLatency = 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 }
var Root = Spans{ &SpanStartupController, &SpanWorkflow, }
var SpanArchiveArtifact = Span{ // contains filtered or unexported fields }
var SpanCaptureScriptResult = Span{ // contains filtered or unexported fields }
var SpanCreateTaskResult = Span{ // contains filtered or unexported fields }
var SpanCreateWorkflowPod = Span{ // contains filtered or unexported fields }
var SpanLoadArtifact = Span{ // contains filtered or unexported fields }
var SpanLoadArtifacts = Span{ // contains filtered or unexported fields }
var SpanNode = Span{ // contains filtered or unexported fields }
var SpanNodePhase = Span{ // contains filtered or unexported fields }
var SpanPatchTaskResult = Span{ // contains filtered or unexported fields }
var SpanPatchTaskResultLabels = Span{ // contains filtered or unexported fields }
var SpanPersistUpdates = Span{ // contains filtered or unexported fields }
var SpanPodReconciliation = Span{ // contains filtered or unexported fields }
var SpanProcessDataTemplate = Span{ // contains filtered or unexported fields }
var SpanReconcileTaskResult = Span{ // contains filtered or unexported fields }
var SpanReconcileTaskResults = Span{ // contains filtered or unexported fields }
var SpanReconcileWorkflow = Span{ // contains filtered or unexported fields }
var SpanRunInitContainer = Span{ // contains filtered or unexported fields }
var SpanRunMainContainer = Span{ // contains filtered or unexported fields }
var SpanRunSupervisorContainer = Span{ // contains filtered or unexported fields }
var SpanRunWaitContainer = Span{ // contains filtered or unexported fields }
var SpanSaveArtifact = Span{ // contains filtered or unexported fields }
var SpanSaveArtifacts = Span{ // contains filtered or unexported fields }
var SpanSaveContainerLogs = Span{ // contains filtered or unexported fields }
var SpanSaveLogs = Span{ // contains filtered or unexported fields }
var SpanStageFiles = Span{ // contains filtered or unexported fields }
var SpanStartupCacheSync = Span{ // contains filtered or unexported fields }
var SpanStartupController = Span{ // contains filtered or unexported fields }
var SpanTryAcquireLock = Span{ // contains filtered or unexported fields }
var SpanUnarchiveArtifact = Span{ // contains filtered or unexported fields }
var SpanWaitClientRateLimiter = Span{ // contains filtered or unexported fields }
var SpanWaitWorkload = Span{ // contains filtered or unexported fields }
var SpanWorkflow = Span{ // contains filtered or unexported fields }
var SpanWorkflowPhase = Span{ // contains filtered or unexported fields }
Functions ¶
Types ¶
type Attributes ¶ added in v4.1.0
type Attributes []Attribute
type BuiltinAttribute ¶
type BuiltinAttribute struct {
// contains filtered or unexported fields
}
type BuiltinInstrument ¶
type BuiltinInstrument struct {
// contains filtered or unexported fields
}
func (*BuiltinInstrument) Name ¶
func (bi *BuiltinInstrument) Name() string
type Carrier ¶ added in v4.1.0
type Carrier struct {
// SetEnvFunc is a function that sets the environment variable.
// Usually, you want to set the environment variable for processes
// that are spawned by the current process.
// By default implementation, it does nothing.
// Using os.Setenv here is discouraged as the environment should
// be immutable:
// https://opentelemetry.io/docs/specs/otel/context/env-carriers/#environment-variable-immutability
SetEnvFunc func(key, value string)
}
Carrier is a TextMapCarrier that uses the environment variables as a storage medium for propagated key-value pairs. The keys are uppercased before being used to access the environment variables. This is useful for propagating values that are set in the environment and need to be accessed by different processes or services. The keys are uppercased to avoid case sensitivity issues across different operating systems and environments.
func (Carrier) Get ¶ added in v4.1.0
Get returns the value associated with the passed key. The key is uppercased before being used to access the environment variable.
type DeprecatedFeatureMetricOption ¶ added in v4.1.0
type DeprecatedFeatureMetricOption func(*Attributes)
DeprecatedFeatureMetricOption is a functional option for configuring optional attributes on DeprecatedFeature
func WithWorkflowNamespace ¶
func WithWorkflowNamespace(workflowNamespace string) DeprecatedFeatureMetricOption
WithWorkflowNamespace sets the namespace attribute
type InstAttrib ¶
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 Attributes)
func (*Instrument) GetDescription ¶
func (i *Instrument) GetDescription() string
func (*Instrument) GetName ¶
func (i *Instrument) GetName() string
func (*Instrument) GetOtel ¶
func (i *Instrument) GetOtel() any
func (*Instrument) GetUserdata ¶
func (i *Instrument) GetUserdata() any
func (*Instrument) ObserveFloat ¶
func (i *Instrument) ObserveFloat(ctx context.Context, o metric.Observer, val float64, attribs Attributes)
func (*Instrument) ObserveInt ¶
func (i *Instrument) ObserveInt(ctx context.Context, o metric.Observer, val int64, attribs Attributes)
func (*Instrument) Record ¶
func (i *Instrument) Record(ctx context.Context, val float64, attribs Attributes)
func (*Instrument) RegisterCallback ¶
func (i *Instrument) RegisterCallback(m *Metrics, f metric.Callback) error
func (*Instrument) SetUserdata ¶
func (i *Instrument) SetUserdata(data any)
type InstrumentOption ¶ added in v4.1.0
type InstrumentOption func(*instrumentOptions)
InstrumentOption is a functional option for configuring instruments.
func WithAsBuiltIn ¶
func WithAsBuiltIn() InstrumentOption
func WithDefaultBuckets ¶
func WithDefaultBuckets(buckets []float64) InstrumentOption
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func (*Metrics) AddCronworkflowsConcurrencypolicyTriggered ¶
func (m *Metrics) AddCronworkflowsConcurrencypolicyTriggered(ctx context.Context, val int64, cronWFName string, cronWFNamespace string, concurrencyPolicy string)
AddCronworkflowsConcurrencypolicyTriggered adds a value to the cronworkflows_concurrencypolicy_triggered counter
func (*Metrics) AddCronworkflowsTriggeredTotal ¶
func (m *Metrics) AddCronworkflowsTriggeredTotal(ctx context.Context, val int64, cronWFName string, cronWFNamespace string)
AddCronworkflowsTriggeredTotal adds a value to the cronworkflows_triggered_total counter
func (*Metrics) AddDeprecatedFeature ¶
func (m *Metrics) AddDeprecatedFeature(ctx context.Context, val int64, deprecatedFeature string, opts ...DeprecatedFeatureMetricOption)
AddDeprecatedFeature adds a value to the deprecated_feature counter
func (*Metrics) AddErrorCount ¶
AddErrorCount adds a value to the error_count counter
func (*Metrics) AddInstrument ¶
func (m *Metrics) AddInstrument(name string, inst *Instrument)
func (*Metrics) AddK8sRequestTotal ¶
func (m *Metrics) AddK8sRequestTotal(ctx context.Context, val int64, requestKind string, requestVerb string, requestCode int)
AddK8sRequestTotal adds a value to the k8s_request_total counter
func (*Metrics) AddLocksTakenTotal ¶ added in v4.1.0
func (m *Metrics) AddLocksTakenTotal(ctx context.Context, val int64, lockType string, lockStorage string, lockName string, lockNamespace string)
AddLocksTakenTotal adds a value to the locks_taken_total counter
func (*Metrics) AddLogMessages ¶
AddLogMessages adds a value to the log_messages counter
func (*Metrics) AddPodMissing ¶
func (m *Metrics) AddPodMissing(ctx context.Context, val int64, nodePhase string, recentlyStarted bool)
AddPodMissing adds a value to the pod_missing counter
func (*Metrics) AddPodPendingCount ¶
func (m *Metrics) AddPodPendingCount(ctx context.Context, val int64, podPendingReason string, podNamespace string)
AddPodPendingCount adds a value to the pod_pending_count counter
func (*Metrics) AddPodRestartsTotal ¶
func (m *Metrics) AddPodRestartsTotal(ctx context.Context, val int64, podRestartReason string, podNamespace string, opts ...PodRestartsTotalMetricOption)
AddPodRestartsTotal adds a value to the pod_restarts_total counter
func (*Metrics) AddPodsTotalCount ¶
func (m *Metrics) AddPodsTotalCount(ctx context.Context, val int64, podPhase string, podNamespace string)
AddPodsTotalCount adds a value to the pods_total_count counter
func (*Metrics) AddQueueAddsCount ¶
AddQueueAddsCount adds a value to the queue_adds_count counter
func (*Metrics) AddQueueDepthGauge ¶
AddQueueDepthGauge adds a value to the queue_depth_gauge counter
func (*Metrics) AddQueueRetries ¶
AddQueueRetries adds a value to the queue_retries counter
func (*Metrics) AddTotalCount ¶
func (m *Metrics) AddTotalCount(ctx context.Context, val int64, workflowPhase string, workflowNamespace string)
AddTotalCount adds a value to the total_count counter
func (*Metrics) AddVersion ¶
func (m *Metrics) AddVersion(ctx context.Context, val int64, buildVersion string, buildPlatform string, buildGoVersion string, buildDate string, buildCompiler string, buildGitCommit string, buildGitTreeState string, buildGitTag string)
AddVersion adds a value to the version counter
func (*Metrics) AddWorkersBusyCount ¶
AddWorkersBusyCount adds a value to the workers_busy_count counter
func (*Metrics) AddWorkflowtemplateTriggeredTotal ¶
func (m *Metrics) AddWorkflowtemplateTriggeredTotal(ctx context.Context, val int64, templateName string, templateNamespace string, templateCluster bool, workflowPhase string)
AddWorkflowtemplateTriggeredTotal adds a value to the workflowtemplate_triggered_total counter
func (*Metrics) CreateBuiltinInstrument ¶
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 (m *Metrics) CreateInstrument(instType instrumentType, name, desc, unit string, options ...InstrumentOption) error
func (*Metrics) DeprecatedFeature ¶
func (*Metrics) GetInstrument ¶
func (m *Metrics) GetInstrument(name string) *Instrument
func (*Metrics) IterateROInstruments ¶
func (m *Metrics) IterateROInstruments(fn func(i *Instrument))
IterateROInstruments iterates over every instrument for Read-Only purposes
func (*Metrics) ObserveGauge ¶
func (m *Metrics) ObserveGauge(ctx context.Context, o metric.Observer, val int64, workflowPhase string)
ObserveGauge observes a value for the gauge gauge This is a helper method for use inside RegisterCallback functions
func (*Metrics) ObserveIsLeader ¶
ObserveIsLeader observes a value for the is_leader gauge This is a helper method for use inside RegisterCallback functions
func (*Metrics) ObserveLocksHeld ¶ added in v4.1.0
func (m *Metrics) ObserveLocksHeld(ctx context.Context, o metric.Observer, val int64, lockType string, lockStorage string, lockName string, lockNamespace string)
ObserveLocksHeld observes a value for the locks_held gauge This is a helper method for use inside RegisterCallback functions
func (*Metrics) ObserveLocksPending ¶ added in v4.1.0
func (m *Metrics) ObserveLocksPending(ctx context.Context, o metric.Observer, val int64, lockType string, lockStorage string, lockName string, lockNamespace string)
ObserveLocksPending observes a value for the locks_pending gauge This is a helper method for use inside RegisterCallback functions
func (*Metrics) ObservePodsGauge ¶
func (m *Metrics) ObservePodsGauge(ctx context.Context, o metric.Observer, val int64, podPhase string)
ObservePodsGauge observes a value for the pods_gauge gauge This is a helper method for use inside RegisterCallback functions
func (*Metrics) ObserveQueueLongestRunning ¶
func (m *Metrics) ObserveQueueLongestRunning(ctx context.Context, o metric.Observer, val float64, queueName string)
ObserveQueueLongestRunning observes a value for the queue_longest_running gauge This is a helper method for use inside RegisterCallback functions
func (*Metrics) ObserveQueueUnfinishedWork ¶
func (m *Metrics) ObserveQueueUnfinishedWork(ctx context.Context, o metric.Observer, val float64, queueName string)
ObserveQueueUnfinishedWork observes a value for the queue_unfinished_work gauge This is a helper method for use inside RegisterCallback functions
func (*Metrics) ObserveWorkflowCondition ¶
func (m *Metrics) ObserveWorkflowCondition(ctx context.Context, o metric.Observer, val int64, workflowType string, workflowStatus string)
ObserveWorkflowCondition observes a value for the workflow_condition gauge This is a helper method for use inside RegisterCallback functions
func (*Metrics) RecordClientRateLimiterLatency ¶ added in v4.1.0
RecordClientRateLimiterLatency records a value to the client_rate_limiter_latency histogram
func (*Metrics) RecordK8sRequestDuration ¶
func (m *Metrics) RecordK8sRequestDuration(ctx context.Context, val float64, requestKind string, requestVerb string, requestCode int)
RecordK8sRequestDuration records a value to the k8s_request_duration histogram
func (*Metrics) RecordOperationDurationSeconds ¶
RecordOperationDurationSeconds records a value to the operation_duration_seconds histogram
func (*Metrics) RecordQueueDuration ¶
RecordQueueDuration records a value to the queue_duration histogram
func (*Metrics) RecordQueueLatency ¶
RecordQueueLatency records a value to the queue_latency histogram
func (*Metrics) RecordResourceRateLimiterLatency ¶ added in v4.1.0
RecordResourceRateLimiterLatency records a value to the resource_rate_limiter_latency histogram
func (*Metrics) RecordWorkflowtemplateRuntime ¶
func (m *Metrics) RecordWorkflowtemplateRuntime(ctx context.Context, val float64, templateName string, templateNamespace string, templateCluster bool)
RecordWorkflowtemplateRuntime records a value to the workflowtemplate_runtime histogram
func (*Metrics) RunPrometheusServer ¶
RunPrometheusServer starts a prometheus metrics server If 'isDummy' is set to true, the dummy metrics server will be started. If it's false, the prometheus metrics server will be started
type MetricsConfig ¶ added in v4.1.0
type MetricsModifier ¶ added in v4.1.0
type MetricsModifier struct {
Disabled bool
DisabledAttributes []string
HistogramBuckets []float64
}
MetricsModifier holds options to change the behaviour for a single metric
type NodePhaseSpanOption ¶ added in v4.1.0
NodePhaseSpanOption is a functional option for configuring optional attributes on NodePhase
func WithMessage ¶ added in v4.1.0
func WithMessage(message string) NodePhaseSpanOption
WithMessage sets the message attribute
type PodRestartsTotalMetricOption ¶ added in v4.1.0
type PodRestartsTotalMetricOption func(*Attributes)
PodRestartsTotalMetricOption is a functional option for configuring optional attributes on PodRestartsTotal
func WithPodRestartCondition ¶
func WithPodRestartCondition(podRestartCondition string) PodRestartsTotalMetricOption
WithPodRestartCondition sets the condition attribute
type Span ¶ added in v4.1.0
type Span struct {
// contains filtered or unexported fields
}
func (*Span) AllDescendantNames ¶ added in v4.1.0
AllDescendantNames returns all descendant span runtime names (depth-first).
func (*Span) ExpectedChildren ¶ added in v4.1.0
ExpectedChildren returns the runtime names of expected children.
func (*Span) FindDescendant ¶ added in v4.1.0
FindDescendant searches recursively for a descendant span with the given runtime name. Returns nil if not found.
func (*Span) HasChild ¶ added in v4.1.0
HasChild returns true if this span has a child with the given runtime name.
func (*Span) RuntimeName ¶ added in v4.1.0
RuntimeName returns the span name as it appears at runtime (lowerCamelCase). This matches what's passed to tracer.Start() in the generated code.
type Spans ¶ added in v4.1.0
type Spans []*Span
func AllNoParentSpans ¶ added in v4.1.0
func AllNoParentSpans() Spans
type TestMetricsExporter ¶
TestMetricsExporter 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(ctx context.Context, name string, attribs *attribute.Set) (float64, error)
GetFloat64CounterValue returns an otel float64 counter value for test reads
func (*TestMetricsExporter) GetFloat64GaugeValue ¶
func (t *TestMetricsExporter) GetFloat64GaugeValue(ctx context.Context, name string, attribs *attribute.Set) (float64, error)
GetFloat64GaugeValue returns an otel float64 gauge value for test reads
func (*TestMetricsExporter) GetFloat64HistogramData ¶
func (t *TestMetricsExporter) GetFloat64HistogramData(ctx context.Context, 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(ctx context.Context, name string, attribs *attribute.Set) (int64, error)
GetInt64CounterValue returns an otel int64 counter value for test reads
func (*TestMetricsExporter) GetInt64GaugeValue ¶
func (t *TestMetricsExporter) GetInt64GaugeValue(ctx context.Context, name string, attribs *attribute.Set) (int64, error)
GetInt64GaugeValue returns an otel int64 gauge value for test reads
type TestTracingExporter ¶ added in v4.1.0
type TestTracingExporter struct {
// contains filtered or unexported fields
}
TestTracingExporter is an opentelemetry tracing exporter, purely for use within tests. It collects spans in-memory and provides methods to query them by name and attributes for the purposes of testing only. This is a public structure as it is used outside of this module also.
func NewTestTracingExporter ¶ added in v4.1.0
func NewTestTracingExporter() *TestTracingExporter
NewTestTracingExporter creates a new test tracing exporter
func (*TestTracingExporter) ExportSpans ¶ added in v4.1.0
func (t *TestTracingExporter) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error
ExportSpans implements the SpanExporter interface, collecting spans in-memory
func (*TestTracingExporter) GetChildSpans ¶ added in v4.1.0
func (t *TestTracingExporter) GetChildSpans(parentSpanID trace.SpanID) []sdktrace.ReadOnlySpan
GetChildSpans returns all spans that have the given parent span ID
func (*TestTracingExporter) GetRootSpans ¶ added in v4.1.0
func (t *TestTracingExporter) GetRootSpans() []sdktrace.ReadOnlySpan
GetRootSpans returns all spans that have no parent (root spans)
func (*TestTracingExporter) GetSpanByName ¶ added in v4.1.0
func (t *TestTracingExporter) GetSpanByName(name string) (sdktrace.ReadOnlySpan, error)
GetSpanByName returns the first span matching the given name
func (*TestTracingExporter) GetSpanByNameAndAttributes ¶ added in v4.1.0
func (t *TestTracingExporter) GetSpanByNameAndAttributes(name string, attribs *attribute.Set) (sdktrace.ReadOnlySpan, error)
GetSpanByNameAndAttributes returns the first span matching the given name and attributes
func (*TestTracingExporter) GetSpans ¶ added in v4.1.0
func (t *TestTracingExporter) GetSpans() []sdktrace.ReadOnlySpan
GetSpans returns all collected spans
func (*TestTracingExporter) GetSpansByName ¶ added in v4.1.0
func (t *TestTracingExporter) GetSpansByName(name string) []sdktrace.ReadOnlySpan
GetSpansByName returns all spans matching the given name
func (*TestTracingExporter) Reset ¶ added in v4.1.0
func (t *TestTracingExporter) Reset()
Reset clears all collected spans, useful between test cases
func (*TestTracingExporter) Shutdown ¶ added in v4.1.0
func (t *TestTracingExporter) Shutdown(ctx context.Context) error
Shutdown implements the SpanExporter interface, no-op for tests
func (*TestTracingExporter) SpanCount ¶ added in v4.1.0
func (t *TestTracingExporter) SpanCount() int
SpanCount returns the number of collected spans
type Tracing ¶ added in v4.1.0
type Tracing struct {
// contains filtered or unexported fields
}
func NewTracing ¶ added in v4.1.0
func (*Tracing) BreakTrace ¶ added in v4.1.0
BreakTrace completely removes the trace from the context The next span created will be a top level trace, it does not traverse up the span tree to the parent
func (*Tracing) Shutdown ¶ added in v4.1.0
Shutdown flushes any remaining spans and shuts down the trace provider.
func (*Tracing) StartArchiveArtifact ¶ added in v4.1.0
StartArchiveArtifact starts a archive_artifact span
func (*Tracing) StartCaptureScriptResult ¶ added in v4.1.0
StartCaptureScriptResult starts a capture_script_result span
func (*Tracing) StartCreateTaskResult ¶ added in v4.1.0
StartCreateTaskResult starts a create_task_result span
func (*Tracing) StartCreateWorkflowPod ¶ added in v4.1.0
func (t *Tracing) StartCreateWorkflowPod(ctx context.Context, nodeID string) (context.Context, trace.Span)
StartCreateWorkflowPod starts a create_workflow_pod span
func (*Tracing) StartLoadArtifact ¶ added in v4.1.0
func (t *Tracing) StartLoadArtifact(ctx context.Context, artifactPath string) (context.Context, trace.Span)
StartLoadArtifact starts a load_artifact span
func (*Tracing) StartLoadArtifacts ¶ added in v4.1.0
StartLoadArtifacts starts a load_artifacts span
func (*Tracing) StartNode ¶ added in v4.1.0
func (t *Tracing) StartNode(ctx context.Context, nodeID string, workflowName string, workflowNamespace string, nodeType string) (context.Context, trace.Span)
StartNode starts a node span
func (*Tracing) StartNodePhase ¶ added in v4.1.0
func (t *Tracing) StartNodePhase(ctx context.Context, nodeID string, nodePhase string, opts ...NodePhaseSpanOption) (context.Context, trace.Span)
StartNodePhase starts a node_phase span
func (*Tracing) StartPatchTaskResult ¶ added in v4.1.0
StartPatchTaskResult starts a patch_task_result span
func (*Tracing) StartPatchTaskResultLabels ¶ added in v4.1.0
StartPatchTaskResultLabels starts a patch_task_result_labels span
func (*Tracing) StartPersistUpdates ¶ added in v4.1.0
StartPersistUpdates starts a persist_updates span
func (*Tracing) StartPodReconciliation ¶ added in v4.1.0
StartPodReconciliation starts a pod_reconciliation span
func (*Tracing) StartProcessDataTemplate ¶ added in v4.1.0
StartProcessDataTemplate starts a process_data_template span
func (*Tracing) StartReconcileTaskResult ¶ added in v4.1.0
func (t *Tracing) StartReconcileTaskResult(ctx context.Context, taskResultName string, taskResultCompleted bool) (context.Context, trace.Span)
StartReconcileTaskResult starts a reconcile_task_result span
func (*Tracing) StartReconcileTaskResults ¶ added in v4.1.0
StartReconcileTaskResults starts a reconcile_task_results span
func (*Tracing) StartReconcileWorkflow ¶ added in v4.1.0
StartReconcileWorkflow starts a reconcile_workflow span
func (*Tracing) StartRunInitContainer ¶ added in v4.1.0
func (t *Tracing) StartRunInitContainer(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
StartRunInitContainer starts a run_init_container span
func (*Tracing) StartRunMainContainer ¶ added in v4.1.0
func (t *Tracing) StartRunMainContainer(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
StartRunMainContainer starts a run_main_container span
func (*Tracing) StartRunSupervisorContainer ¶ added in v4.1.0
func (t *Tracing) StartRunSupervisorContainer(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
StartRunSupervisorContainer starts a run_supervisor_container span
func (*Tracing) StartRunWaitContainer ¶ added in v4.1.0
func (t *Tracing) StartRunWaitContainer(ctx context.Context, workflowName string, workflowNamespace string) (context.Context, trace.Span)
StartRunWaitContainer starts a run_wait_container span
func (*Tracing) StartSaveArtifact ¶ added in v4.1.0
StartSaveArtifact starts a save_artifact span
func (*Tracing) StartSaveArtifacts ¶ added in v4.1.0
StartSaveArtifacts starts a save_artifacts span
func (*Tracing) StartSaveContainerLogs ¶ added in v4.1.0
func (t *Tracing) StartSaveContainerLogs(ctx context.Context, containerName string) (context.Context, trace.Span)
StartSaveContainerLogs starts a save_container_logs span
func (*Tracing) StartSaveLogs ¶ added in v4.1.0
StartSaveLogs starts a save_logs span
func (*Tracing) StartStageFiles ¶ added in v4.1.0
StartStageFiles starts a stage_files span
func (*Tracing) StartStartupCacheSync ¶ added in v4.1.0
StartStartupCacheSync starts a startup_cache_sync span
func (*Tracing) StartStartupController ¶ added in v4.1.0
StartStartupController starts a startup_controller span
func (*Tracing) StartTryAcquireLock ¶ added in v4.1.0
func (t *Tracing) StartTryAcquireLock(ctx context.Context, lockName string, lockAcquired bool) (context.Context, trace.Span)
StartTryAcquireLock starts a try_acquire_lock span
func (*Tracing) StartUnarchiveArtifact ¶ added in v4.1.0
func (t *Tracing) StartUnarchiveArtifact(ctx context.Context, artifactArchive string) (context.Context, trace.Span)
StartUnarchiveArtifact starts a unarchive_artifact span
func (*Tracing) StartWaitClientRateLimiter ¶ added in v4.1.0
StartWaitClientRateLimiter starts a wait_client_rate_limiter span
func (*Tracing) StartWaitWorkload ¶ added in v4.1.0
StartWaitWorkload starts a wait_workload span
type TracingConfig ¶ added in v4.1.0
type TracingConfig struct {
Modifiers map[string]TracingModifier
}
type TracingModifier ¶ added in v4.1.0
TracingModifier holds options to change the behaviour for a trace