Skip to content

Commit

Permalink
Merge pull request #3498 from Avishka-Shamendra/main-minor-fixes
Browse files Browse the repository at this point in the history
Fix Minor Code Styling Changes
  • Loading branch information
senthuran16 authored Mar 11, 2024
2 parents 656ad30 + 23cf1e4 commit 0c1943d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions adapter/internal/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ func Run(conf *config.Config) {
})
}

logger.LoggerMgw.Info("Starting adapter ....")
logger.LoggerMgw.Info("Starting adapter ....")

// Start the metrics server
if conf.Adapter.Metrics.Enabled && strings.EqualFold(conf.Adapter.Metrics.Type, metrics.PrometheusMetricType) {
logger.LoggerMgw.Info("Starting Prometheus Metrics Server ....")
Expand Down
8 changes: 7 additions & 1 deletion adapter/pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ func handleError(err error, message string) bool {
return false
}

// StartPrometheusMetricsServer initializes and starts the metrics server to expose metrics to prometheus.
/* StartPrometheusMetricsServer initializes and starts the metrics server to expose metrics to prometheus.
It employs goroutines for concurrent execution of serving metrics and recording them, while ensuring
sequential execution for each recordMetrics call using a synchronization channel (done).
Parameters:
- port: The port number to listen on.
- collectionInterval: The interval for recording metrics.
*/
func StartPrometheusMetricsServer(port int32, collectionInterval int32) {
done := make(chan struct{}) // Channel to indicate recordMetrics routine exit

Expand Down

0 comments on commit 0c1943d

Please sign in to comment.