Merged in feature/semver (pull request #93)
Add semantic versioning to all services * working * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/semver * 1.24 mod * go upgrade * tool * Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/semver
This commit is contained in:
@@ -20,16 +20,14 @@ import (
|
||||
"math/rand"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime/debug"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"queryorchestration/internal/serviceconfig/observability/prometheus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
func getMetricsConfig() prometheus.MetricsConfig {
|
||||
standardDefinitions := prometheus.NewStandardMetricDefinitions()
|
||||
// Define metrics configuration using StandardMetricDefinitions
|
||||
config := prometheus.MetricsConfig{
|
||||
@@ -51,6 +49,23 @@ func main() {
|
||||
),
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
func main() {
|
||||
info, ok := debug.ReadBuildInfo()
|
||||
if !ok {
|
||||
fmt.Println("Failed to read build info")
|
||||
return
|
||||
}
|
||||
fmt.Printf("Version: %s\n", info.Main.Version)
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
// Define metrics configuration using StandardMetricDefinitions
|
||||
config := getMetricsConfig()
|
||||
|
||||
metrics, err := prometheus.New(ctx, config)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to create metrics: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user