refactors air.toml configuration, updates Go dependencies, and improves application startup telemetry and signal handling.

This commit is contained in:
2025-08-14 15:58:46 -04:00
parent 497d85cf1c
commit 925c3f34a9
4 changed files with 18 additions and 85 deletions

View File

@@ -16,13 +16,13 @@ import (
"os"
"os/signal"
"sync"
"syscall"
"time"
"github.com/rs/zerolog"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
"golang.org/x/sys/unix"
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/app"
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/otel"
@@ -50,7 +50,7 @@ var (
)
func main() {
ctx, cncl := signal.NotifyContext(context.Background(), os.Interrupt, unix.SIGTERM)
ctx, cncl := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)
defer cncl()
// Load configuration and setup logging. The go-app framework
@@ -96,6 +96,11 @@ func main() {
app.GRPC = grpcSvcs
app.HTTP = httpSvcs
span.SetAttributes(
attribute.Int("grpcServices", len(app.GRPC.Services)),
attribute.Int("httpServices", len(app.HTTP.Funcs)+len(app.HTTP.Handlers)),
)
// Launch app
app.MustRun()