Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renaming metrics to adhere to OTEL #15087

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickhuie19 IIUC all metrics should be prefixed by "platform"; is that for all metrics everywhere, or is "platform" just the prefix for Keystone related things?

Copy link
Contributor Author

@patrickhuie19 patrickhuie19 Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just the prefix for Keystone related things

this 👍

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
Loading