use tags instead of logs

This commit is contained in:
bergquist
2017-09-11 18:48:20 +02:00
parent 89c86c7a22
commit e128310045
3 changed files with 10 additions and 18 deletions

View File

@@ -5,7 +5,6 @@ import (
"time"
"github.com/opentracing/opentracing-go"
tlog "github.com/opentracing/opentracing-go/log"
"github.com/benbjohnson/clock"
"github.com/grafana/grafana/pkg/log"
@@ -122,11 +121,10 @@ func (e *Engine) processJob(grafanaCtx context.Context, job *Job) error {
e.evalHandler.Eval(evalContext)
e.resultHandler.Handle(evalContext)
span.LogFields(
tlog.Int64("alertId", evalContext.Rule.Id),
tlog.Int64("dashboardId", evalContext.Rule.DashboardId),
tlog.Bool("firing", evalContext.Firing),
)
span.SetTag("alertId", evalContext.Rule.Id)
span.SetTag("dashboardId", evalContext.Rule.DashboardId)
span.SetTag("firing", evalContext.Firing)
close(done)
span.Finish()