More metrics (#561)

* Add new spans to agent.submit

* Add new spans to agent.submit

* Add new spans to agent.submit

* Add new spans to agent.submit
This commit is contained in:
Nigel Deakin
2017-12-05 18:26:28 +00:00
committed by Reed Allman
parent d75508ecc3
commit 96f27070be

View File

@@ -196,8 +196,15 @@ func (a *agent) Submit(callI Call) error {
call := callI.(*call) call := callI.(*call)
ctx := call.req.Context() ctx := call.req.Context()
// start spans in the correct order so each span is given, and inherits, the correct baggage
span_global, ctx := opentracing.StartSpanFromContext(ctx, "agent_submit_global")
defer span_global.Finish()
span_app, ctx := opentracing.StartSpanFromContext(ctx, "agent_submit_app")
span_app.SetBaggageItem("fn_appname", callI.Model().AppName)
defer span_app.Finish()
span, ctx := opentracing.StartSpanFromContext(ctx, "agent_submit") span, ctx := opentracing.StartSpanFromContext(ctx, "agent_submit")
span.SetBaggageItem("fn_appname", callI.Model().AppName)
span.SetBaggageItem("fn_path", callI.Model().Path) span.SetBaggageItem("fn_path", callI.Model().Path)
defer span.Finish() defer span.Finish()