Skip to content

Commit

Permalink
renaming metrics to adhere to OTEL (#15087)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 authored Nov 4, 2024
1 parent 7bac85f commit 2ba2f92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions core/services/registrysyncer/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
12 changes: 6 additions & 6 deletions core/services/workflows/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 2ba2f92

Please sign in to comment.