发布

  • [OPIK-7139] [BE] [FE] BI events for Agent Insights + trigger_source (#7313)

    frostbyte_neo 发布于 2026-07-02 11:01:28 +00:00

    • feat(diagnostics): thread trigger_source (manual|scheduled) to the Ollie trigger

    Carry a trigger_source from the enqueue site through the Redis message, the
    report client, and the platform trigger payload so Ollie can tag its BI events.
    triggerNow (Run diagnostics) sends "manual"; the daily sweep sends "scheduled".
    No BE product-BI events — OTel metrics already cover the trigger; this is only
    the pass-through of the source.

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

    • feat(diagnostics): BI events for the Run-diagnostics UI (Segment)

    Add opik_diagnostics_* trackEvent calls across the Signals UI: run clicked
    (source + is_first_run), run completed (duration), run failed (reason), try
    again, auto-diagnostic enabled/disabled (header + settings), issue
    resolved/reopened, and continue-with-Ollie. Expose startedAt from
    useDiagnosticsRunState for the completed-run duration. No-op when Segment is off.

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

    • fix(diagnostics): tolerate legacy queued messages missing trigger_source

    Make AgentInsightsReportMessage.triggerSource nullable (was @NonNull) so a
    message enqueued before this field existed still deserializes on a rolling
    upgrade; the subscriber defaults a null to "scheduled". Addresses review.

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

    • docs(diagnostics): javadoc-style comment for triggerSource

    Move the triggerSource note into the record's Javadoc as an @param (review nit).

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com


    Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

    下载附件