mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon/metrics: Move out to internal/metrics
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"github.com/docker/docker/daemon/images"
|
||||
"github.com/docker/docker/errdefs"
|
||||
"github.com/docker/docker/image"
|
||||
"github.com/docker/docker/internal/metrics"
|
||||
"github.com/docker/docker/internal/multierror"
|
||||
"github.com/docker/docker/pkg/idtools"
|
||||
"github.com/docker/docker/runconfig"
|
||||
@@ -112,7 +113,7 @@ func (daemon *Daemon) containerCreate(ctx context.Context, daemonCfg *configStor
|
||||
if err != nil {
|
||||
return containertypes.CreateResponse{Warnings: warnings}, err
|
||||
}
|
||||
containerActions.WithValues("create").UpdateSince(start)
|
||||
metrics.ContainerActions.WithValues("create").UpdateSince(start)
|
||||
|
||||
if warnings == nil {
|
||||
warnings = make([]string, 0) // Create an empty slice to avoid https://github.com/moby/moby/issues/38222
|
||||
@@ -227,7 +228,7 @@ func (daemon *Daemon) create(ctx context.Context, daemonCfg *config.Config, opts
|
||||
if err := daemon.register(ctx, ctr); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
stateCtr.set(ctr.ID, "stopped")
|
||||
metrics.StateCtr.Set(ctr.ID, "stopped")
|
||||
daemon.LogContainerEvent(ctr, events.ActionCreate)
|
||||
return ctr, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user