Exports OTEL initialization function and adds extensive documentation across packages for improved clarity.

This commit is contained in:
2025-08-13 16:01:51 -04:00
parent 31fc6dca16
commit 318115690d
16 changed files with 50 additions and 23 deletions

View File

@@ -62,7 +62,12 @@ func (a *App) initHTTP(ctx context.Context) error {
return err
}
func (a *App) initOTEL() {
func (a *App) InitOTEL() {
if a.tracer != nil {
a.l.Debug().Msg("superfluous call of already configured app otel")
return
}
var otelShutdown shutdownFunc
a.AppContext, otelShutdown = otel.Init(a.AppContext)
a.shutdownFuncs = append(a.shutdownFuncs, otelShutdown)