Skip to content

Commit 6ba06b8

Browse files
author
Reed Allman
authored
Merge pull request #338 from fnproject/fix-nilly
not ready for spans yet in hot land
2 parents a5764b4 + 53ff665 commit 6ba06b8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

api/agent/agent.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ func (a *agent) runHot(slots chan<- slot, call *call, tok Token) error {
596596
}
597597

598598
logger := logrus.WithFields(logrus.Fields{"id": container.id, "app": call.AppName, "route": call.Path, "image": call.Image, "memory": call.Memory, "format": call.Format, "idle_timeout": call.IdleTimeout})
599+
ctx = common.WithLogger(ctx, logger)
599600

600601
cookie, err := a.driver.Prepare(ctx, container)
601602
if err != nil {

api/agent/drivers/docker/docker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/fnproject/fn/api/models"
1717
"github.com/fsouza/go-dockerclient"
1818
"github.com/opentracing/opentracing-go"
19-
"github.com/opentracing/opentracing-go/log"
2019
"github.com/sirupsen/logrus"
2120
)
2221

@@ -459,7 +458,8 @@ func (drv *DockerDriver) wait(ctx context.Context, container string) (status str
459458
case 0:
460459
return drivers.StatusSuccess, nil
461460
case 137: // OOM
462-
opentracing.SpanFromContext(ctx).LogFields(log.String("docker", "oom"))
461+
// TODO put in stats opentracing.SpanFromContext(ctx).LogFields(log.String("docker", "oom"))
462+
common.Logger(ctx).Error("docker oom")
463463
return drivers.StatusKilled, models.NewAPIError(http.StatusBadGateway, errors.New("container out of memory"))
464464
}
465465
}

0 commit comments

Comments
 (0)