Skip to content

Commit

Permalink
Merge pull request #246 from advancedtelematic/fix-metrics-routes
Browse files Browse the repository at this point in the history
move prometheus metrics to unsealed portion of routes
  • Loading branch information
simao authored Sep 16, 2019
2 parents fb10456 + 67dfd72 commit 5558b13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ object Boot extends BootApp
tracing.traceRequests { implicit requestTracing =>
new TufReposerverRoutes(keyStoreClient, NamespaceValidation.withDatabase, targetStore,
messageBusPublisher,
prometheusMetricsRoutes,
Seq(keyserverHealthCheck)).routes
} ~ prometheusMetricsRoutes
}
}

Http().bindAndHandle(routes, host, port)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class TufReposerverRoutes(keyserverClient: KeyserverClient,
namespaceValidation: NamespaceValidation,
targetStore: TargetStore,
messageBusPublisher: MessageBusPublisher,
metricsRoutes: Route = Directives.reject,
dependencyChecks: Seq[HealthCheck] = Seq.empty)
(implicit val db: Database, val ec: ExecutionContext, mat: Materializer) extends VersionInfo {

Expand All @@ -28,7 +29,7 @@ class TufReposerverRoutes(keyserverClient: KeyserverClient,
ErrorHandler.handleErrors {
pathPrefix("api" / "v1") {
new RepoResource(keyserverClient, namespaceValidation, targetStore, new TufTargetsPublisher(messageBusPublisher)).route
} ~ DbHealthResource(versionMap, dependencies = dependencyChecks).route
} ~ DbHealthResource(versionMap, dependencies = dependencyChecks).route ~ metricsRoutes
}
}
}

0 comments on commit 5558b13

Please sign in to comment.