Files
weave-scope/render/func_name.go
Bryan Boreham 3be8cf71dd Add more Opentracing detail to the app (#3383)
* Pass Go context down to Renderers

This is useful for cancellation or tracing.

* Add tracing spans to app

Also log things like number of nodes in Map, total number of reports.
2018-10-26 11:21:33 +05:30

18 lines
311 B
Go

package render
import (
"reflect"
"runtime"
)
func functionName(i interface{}) string {
return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name()
}
func typeName(i interface{}) string {
if m, ok := i.(*memoise); ok {
return "memoise:" + typeName(m.Renderer)
}
return reflect.TypeOf(i).String()
}