Skip to content

Commit

Permalink
fix(metrics): null value is string null, optional values actually opt…
Browse files Browse the repository at this point in the history
…ional (spinnaker#2385)

* fix(metrics): null value is string null

* fix(pipelineStarter): don't throw exception when optional not present
  • Loading branch information
emjburns authored and clanesf committed Dec 8, 2018
1 parent 7d8a862 commit 372bb89
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class DependentPipelineStarter implements ApplicationContextAware {
this.applicationContext = applicationContext
this.objectMapper = objectMapper
this.contextParameterProcessor = contextParameterProcessor
this.pipelinePreprocessors = pipelinePreprocessors.get()
this.artifactResolver = artifactResolver.get()
this.pipelinePreprocessors = pipelinePreprocessors.orElse(null)
this.artifactResolver = artifactResolver.orElse(null)
this.registry = registry
}

Expand Down Expand Up @@ -143,7 +143,7 @@ class DependentPipelineStarter implements ApplicationContextAware {
pipeline = executionLauncher().start(PIPELINE, json)

Id id = registry.createId("pipelines.triggered")
.withTag("application", Optional.ofNullable(pipeline.getApplication()).orElse("NULL_APPLICATION"))
.withTag("application", Optional.ofNullable(pipeline.getApplication()).orElse("null"))
.withTag("monitor", getClass().getSimpleName())
registry.counter(id).increment()

Expand Down

0 comments on commit 372bb89

Please sign in to comment.