Exports OTEL initialization function and adds extensive documentation across packages for improved clarity.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user