From 2ba2f92c8eb92a0f03852b59cac896fd45789193 Mon Sep 17 00:00:00 2001 From: Patrick Date: Mon, 4 Nov 2024 09:10:53 -0500 Subject: [PATCH] renaming metrics to adhere to OTEL (#15087) --- core/services/registrysyncer/monitoring.go | 4 ++-- core/services/workflows/monitoring.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/services/registrysyncer/monitoring.go b/core/services/registrysyncer/monitoring.go index 97d139d044f..db374b523ff 100644 --- a/core/services/registrysyncer/monitoring.go +++ b/core/services/registrysyncer/monitoring.go @@ -16,12 +16,12 @@ var remoteRegistrySyncFailureCounter metric.Int64Counter var launcherFailureCounter metric.Int64Counter func initMonitoringResources() (err error) { - remoteRegistrySyncFailureCounter, err = beholder.GetMeter().Int64Counter("RemoteRegistrySyncFailure") + remoteRegistrySyncFailureCounter, err = beholder.GetMeter().Int64Counter("platform.registry_syncer.sync.failures") if err != nil { return fmt.Errorf("failed to register sync failure counter: %w", err) } - launcherFailureCounter, err = beholder.GetMeter().Int64Counter("LauncherFailureCounter") + launcherFailureCounter, err = beholder.GetMeter().Int64Counter("platform.registry_syncer.launch.failures") if err != nil { return fmt.Errorf("failed to register launcher failure counter: %w", err) } diff --git a/core/services/workflows/monitoring.go b/core/services/workflows/monitoring.go index bd448afd9e5..4e6f3fc29e8 100644 --- a/core/services/workflows/monitoring.go +++ b/core/services/workflows/monitoring.go @@ -20,32 +20,32 @@ var workflowStepErrorCounter metric.Int64Counter var engineHeartbeatCounter metric.Int64UpDownCounter func initMonitoringResources() (err error) { - registerTriggerFailureCounter, err = beholder.GetMeter().Int64Counter("RegisterTriggerFailure") + registerTriggerFailureCounter, err = beholder.GetMeter().Int64Counter("platform.engine.register_trigger.failures") if err != nil { return fmt.Errorf("failed to register trigger failure counter: %w", err) } - workflowsRunningGauge, err = beholder.GetMeter().Int64Gauge("WorkflowsRunning") + workflowsRunningGauge, err = beholder.GetMeter().Int64Gauge("platform.engine.workflows.count") if err != nil { return fmt.Errorf("failed to register workflows running gauge: %w", err) } - capabilityInvocationCounter, err = beholder.GetMeter().Int64Counter("CapabilityInvocation") + capabilityInvocationCounter, err = beholder.GetMeter().Int64Counter("platform.engine.capabilities_invoked.count") if err != nil { return fmt.Errorf("failed to register capability invocation counter: %w", err) } - workflowExecutionLatencyGauge, err = beholder.GetMeter().Int64Gauge("WorkflowExecutionLatency") + workflowExecutionLatencyGauge, err = beholder.GetMeter().Int64Gauge("platform.engine.workflow.time") if err != nil { return fmt.Errorf("failed to register workflow execution latency gauge: %w", err) } - workflowStepErrorCounter, err = beholder.GetMeter().Int64Counter("WorkflowStepError") + workflowStepErrorCounter, err = beholder.GetMeter().Int64Counter("platform.engine.workflow.errors") if err != nil { return fmt.Errorf("failed to register workflow step error counter: %w", err) } - engineHeartbeatCounter, err = beholder.GetMeter().Int64UpDownCounter("EngineHeartbeat") + engineHeartbeatCounter, err = beholder.GetMeter().Int64UpDownCounter("platform.engine.heartbeat") if err != nil { return fmt.Errorf("failed to register engine heartbeat counter: %w", err) }