Skip to content

Commit

Permalink
Use correct statsd
Browse files Browse the repository at this point in the history
  • Loading branch information
dturn committed Oct 24, 2019
1 parent aa8617f commit 90bced6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/krane/global_deploy_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,27 @@ def run!(verify_result: true, prune: true)
logger.phase_heading("Deploying all resources")
deploy!(resources, verify_result, prune)

StatsD.event("Deployment succeeded",
KubernetesDeploy::StatsD.event("Deployment succeeded",
"Successfully deployed all resources to #{context}",
alert_type: "success", tags: statsd_tags << "status:success")
StatsD.distribution('all_resources.duration', KubernetesDeploy::StatsD.duration(start),
KubernetesDeploy::StatsD.distribution('all_resources.duration', KubernetesDeploy::StatsD.duration(start),
tags: statsd_tags << "status:success")
logger.print_summary(:success)
rescue KubernetesDeploy::DeploymentTimeoutError
logger.print_summary(:timed_out)
StatsD.event("Deployment timed out",
KubernetesDeploy::StatsD.event("Deployment timed out",
"One or more resources failed to deploy to #{context} in time",
alert_type: "error", tags: statsd_tags << "status:timeout")
StatsD.distribution('all_resources.duration', KubernetesDeploy::StatsD.duration(start),
KubernetesDeploy::StatsD.distribution('all_resources.duration', KubernetesDeploy::StatsD.duration(start),
tags: statsd_tags << "status:timeout")
raise
rescue KubernetesDeploy::FatalDeploymentError => error
logger.summary.add_action(error.message) if error.message != error.class.to_s
logger.print_summary(:failure)
StatsD.event("Deployment failed",
KubernetesDeploy::StatsD.event("Deployment failed",
"One or more resources failed to deploy to #{context}",
alert_type: "error", tags: statsd_tags << "status:failed")
StatsD.distribution('all_resources.duration', KubernetesDeploy::StatsD.duration(start),
KubernetesDeploy::StatsD.distribution('all_resources.duration', KubernetesDeploy::StatsD.duration(start),
tags: statsd_tags << "status:failed")
raise
end
Expand Down

0 comments on commit 90bced6

Please sign in to comment.