Skip to content

Commit 750ce8f

Browse files
committed
add graceful shutdown
1 parent 1f6bd1e commit 750ce8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func main() {
197197
// Force a flush of any pending spans
198198
shutdownCtx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
199199
defer cancel()
200-
if err := tp.ForceFlush(shutdownCtx); err != nil {
200+
if err := tp.Shutdown(shutdownCtx); err != nil {
201201
log.Errorf("Error flushing spans: %v", err)
202202
} else {
203203
log.Info("Spans successfully flushed")

0 commit comments

Comments
 (0)