Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/orchestrator/pkg/sandbox/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -1398,14 +1398,17 @@ func (s *Sandbox) WaitForEnvd(
defer span.End()

defer func() {
if e != nil {
return
}
duration := time.Since(start).Milliseconds()
waitForEnvdDurationHistogram.Record(ctx, duration, metric.WithAttributes(
telemetry.WithEnvdVersion(s.Config.Envd.Version),
attribute.Int64("timeout_ms", s.internalConfig.EnvdInitRequestTimeout.Milliseconds()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The timeout_ms attribute currently records the individual request timeout, but the histogram measures the total duration of the WaitForEnvd operation. To provide accurate observability for the entire initialization process, this attribute should reflect the total timeout allowed for the operation.

Suggested change
attribute.Int64("timeout_ms", s.internalConfig.EnvdInitRequestTimeout.Milliseconds()),
attribute.Int64("timeout_ms", timeout.Milliseconds()),

attribute.Bool("success", e == nil),
))

if e != nil {
return
}

// Update the sandbox as started now
s.SetStartedAt(time.Now())
}()
Expand Down
Loading