Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions packages/orchestrator/pkg/sandbox/envd.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (s *Sandbox) convertMounts(mounts []VolumeMountConfig) []envd.VolumeMount {
return results
}

func (s *Sandbox) initEnvd(ctx context.Context) (e error) {
func (s *Sandbox) initEnvd(ctx context.Context, startType StartType) (e error) {
ctx, span := tracer.Start(ctx, "envd-init", trace.WithAttributes(telemetry.WithEnvdVersion(s.Config.Envd.Version)))
defer func() {
if e != nil {
Expand All @@ -236,7 +236,7 @@ func (s *Sandbox) initEnvd(ctx context.Context) (e error) {
span.End()
}()

attributes := []attribute.KeyValue{telemetry.WithEnvdVersion(s.Config.Envd.Version), attribute.Int64("timeout_ms", s.internalConfig.EnvdInitRequestTimeout.Milliseconds())}
attributes := []attribute.KeyValue{telemetry.WithEnvdVersion(s.Config.Envd.Version), attribute.Int64("timeout_ms", s.internalConfig.EnvdInitRequestTimeout.Milliseconds()), attribute.String("start_type", string(startType))}
attributesFail := append(attributes, attribute.Bool("success", false))
attributesSuccess := append(attributes, attribute.Bool("success", true))

Expand Down
7 changes: 4 additions & 3 deletions packages/orchestrator/pkg/sandbox/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ var (
uffdStartupBytesHistogram = utils.Must(telemetry.GetHistogram(meter, telemetry.UffdStartupBytesHistogramName))
)

// Sandbox start types recorded on the orchestrator.sandbox.uffd.startup.*
// metrics via the start_type attribute.
// Sandbox start types recorded on sandbox start/init metrics via the
// start_type attribute.
type StartType string

const (
Expand Down Expand Up @@ -1757,6 +1757,7 @@ func (s *Sandbox) WaitForEnvd(
telemetry.WithEnvdVersion(s.Config.Envd.Version),
attribute.Int64("timeout_ms", s.internalConfig.EnvdInitRequestTimeout.Milliseconds()),
attribute.Bool("success", e == nil),
attribute.String("start_type", string(startType)),
Comment thread
arkamar marked this conversation as resolved.
))

// Record the demand-fault working set the guest needed to reach this
Expand Down Expand Up @@ -1803,7 +1804,7 @@ func (s *Sandbox) WaitForEnvd(
}
}()

if err := s.initEnvd(ctx); err != nil {
if err := s.initEnvd(ctx, startType); err != nil {
return fmt.Errorf("failed to init new envd: %w", err)
}

Expand Down
Loading