发布

  • [OPIK-4073] Add metrics and config for Python execution timeouts (#4966)

    frostbyte_neo 发布于 2026-01-28 13:38:57 +00:00

    • Move total_latency calculation and histogram recording to finally block
      so latency is always recorded regardless of outcome (success/timeout/error)
    • Add span error recording for timeouts and exceptions:
      • record_exception() for stack traces
      • set_status(ERROR) to mark spans as failed
      • set_attribute() for structured error details (type, exit_code, timeout)
    • Add span attributes for latency and payload sizes in finally block
    • Mark invalid_code outcomes as span errors with exit_code attribute

    Co-authored-by: Cursor cursoragent@cursor.com

    • Revision 4: Centralize default config values for cpu_shares and mem_limit

    Co-authored-by: Cursor cursoragent@cursor.com

    • Revision 5: Fix mem_limit format to use Docker SDK compatible unit (256m not 256mb)

    Co-authored-by: Cursor cursoragent@cursor.com


    Co-authored-by: CometActions github-actions@comet.com
    Co-authored-by: Cursor cursoragent@cursor.com

    下载附件