Skip to main content
Applies to:
  • Plan -
  • Deployment -

Summary

Issue: Traces display empty fields or remain “in progress” indefinitely. Cause: Application terminates before flush() completes or spans aren’t properly ended, particularly in serverless/container environments. Resolution: Explicitly call flush() before termination and ensure all spans are ended.

Resolution Steps

Python

TypeScript

Step 2: Call flush() explicitly before process exit

Python

TypeScript

Key Points

  • flush() waits for completion
  • Context managers automatically call span.end()
  • Manual spans: call span.end() in finally blocks or they remain incomplete
  • For serverless functions, call flush() before the handler returns