add root span for weekly reminder

main
William Perron 9 months ago
parent 66a0fd92b7
commit 451a113987
Signed by: wperron
GPG Key ID: BFDB4EF72D73C5F2

@ -732,6 +732,12 @@ func main() {
log.Info().Int("count", len(created)).Dur("startup_latency_ms", time.Since(start)).Msg("registered commands, ready to operate") log.Info().Int("count", len(created)).Dur("startup_latency_ms", time.Since(start)).Msg("registered commands, ready to operate")
go notifier.NotifyFunc(ctx, func() { go notifier.NotifyFunc(ctx, func() {
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
ctx, span := tracer.Start(ctx, "weekly notification", trace.WithNewRoot())
defer span.End()
log.Info().Msg("sending weekly reminder") log.Info().Msg("sending weekly reminder")
absentees, err := store.GetAbsentees(ctx, themis.NextMonday()) absentees, err := store.GetAbsentees(ctx, themis.NextMonday())
if err != nil { if err != nil {

Loading…
Cancel
Save