Skip to content

Commit d8a2b6e

Browse files
DavidS-ovmactions-user
authored andcommitted
Eng 1849 capture per timeline step metrics in honeycomb (#3261)
This is a bunch of changes that streamlines and unifies the otel attributes we collect for change analysis. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Replaces log-heavy paths with structured OTEL spans/Sentry across change analysis, refines blast-radius (classic/LLM) flow with timeouts and graceful degradation, and centralizes arg/metric recording. > > - **Observability/Tracing**: > - Replace many logs with OTEL span attributes; add Sentry error capture and span status on failures. > - Add `RecordArgsAttributes()` to consistently attach `ovm.*` attributes; used throughout steps and recursive calls. > - Track queue wait/duration, step results, mapping stats, risk counts, and v6 investigation metrics. > - **Blast Radius**: > - Split modes: `classic` vs `llm`; choose LLM automatically for v6 without custom hypotheses. > - Enforce configurable max time with cap; on timeout, continue with collected data (graceful degradation) when snapshot exists. > - Default/fallbacks for zero params; use `BlastRadiusMaxConcurrency` directly; improved recursive parallelism and deduped queries. > - Store LLM reasoning/theories in snapshot description when enabled; set summary on change. > - **Error handling/retries**: > - New `recordAndRetryStepError()`; more retryable error paths for gateway/connectivity and DB updates. > - `checkLogAndReturnContextError()` writes span attributes for canceled/timeout contexts. > - Timeline step runner records errors to Sentry and spans before marking DB status. > - **APIs/Types**: > - Remove `TheoriesTool` from change-analysis args (kept only in admin job args for backward compatibility). > - Add `sdp.SnapshotMetadata.GetUUIDParsed()` for safer UUID tracing. > - **Admin/Jobs**: > - Blast-radius worker no longer forwards `TheoriesTool`; clarifies as deprecated; passes new args and captures results/metrics. > - **Tests**: > - Minor fix to fatal error variable; add/adjust tests around job scheduling and sanitization remain unchanged functionally. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fdac95c117a0bd2c9c375e822bfccb534dbae831. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> GitOrigin-RevId: 1422ad7b483a40a03c75a85633dcd6e7b3e7713b
1 parent c763454 commit d8a2b6e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

sdp-go/snapshots.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package sdp
22

3+
import "github.com/google/uuid"
4+
35
func (s *Snapshot) ToMap() map[string]any {
46
return map[string]any{
57
"metadata": s.GetMetadata().ToMap(),
@@ -14,6 +16,17 @@ func (sm *SnapshotMetadata) ToMap() map[string]any {
1416
}
1517
}
1618

19+
func (sm *SnapshotMetadata) GetUUIDParsed() *uuid.UUID {
20+
if sm == nil {
21+
return nil
22+
}
23+
u, err := uuid.FromBytes(sm.GetUUID())
24+
if err != nil {
25+
return nil
26+
}
27+
return &u
28+
}
29+
1730
func (sp *SnapshotProperties) ToMap() map[string]any {
1831
return map[string]any{
1932
"name": sp.GetName(),

0 commit comments

Comments
 (0)