Documentation ¶
Overview ¶
Package traceapp implements the Appdash web UI.
The web UI can be effectively launched using the appdash command (see cmd/appdash) or via embedding this package within your app.
Templates and other resources needed by this package to render the UI are built into the program using vfsgen, so you still get to have single binary deployment.
For an example of embedding the Appdash web UI within your own application via the traceapp package, see the examples/cmd/webapp example.
Index ¶
- Constants
- Variables
- type App
- type Router
- func (r *Router) URLTo(route string) (*url.URL, error)
- func (r *Router) URLToTrace(id appdash.ID) (*url.URL, error)
- func (r *Router) URLToTraceProfile(trace appdash.ID) (*url.URL, error)
- func (r *Router) URLToTraceSpan(trace, span appdash.ID) (*url.URL, error)
- func (r *Router) URLToTraceSpanProfile(trace, span appdash.ID) (*url.URL, error)
- type TemplateCommon
Constants ¶
const ( RootRoute = "traceapp.root" // route name for root StaticRoute = "traceapp.static" // route name for static data files TraceRoute = "traceapp.trace" // route name for a single trace page TraceSpanRoute = "traceapp.trace.span" // route name for a single trace sub-span page TraceProfileRoute = "traceapp.trace.profile" // route name for a JSON trace profile TraceSpanProfileRoute = "traceapp.trace.span.profile" // route name for a JSON trace sub-span profile TraceUploadRoute = "traceapp.trace.upload" // route name for a JSON trace upload TracesRoute = "traceapp.traces" // route name for traces page DashboardRoute = "traceapp.dashboard" // route name for dashboard page DashboardDataRoute = "traceapp.dashboard.data" // route name for dashboard JSON data AggregateRoute = "traceapp.aggregate" // route name for aggregate trace view )
Traceapp's route names.
Variables ¶
var ErrTimelineItemValidation = errors.New("timeline item validation error")
var ( // ReloadTemplates is whether to reload html/template templates // before each request. It is useful during development. ReloadTemplates = true )
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { *Router Store appdash.Store Queryer appdash.Queryer // contains filtered or unexported fields }
App is an HTTP application handler that also exposes methods for constructing URL routes.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is a URL router for traceapp applications. It should be created via the NewRouter function.
func (*Router) URLToTrace ¶
URLToTrace constructs a URL to a given trace by ID.
func (*Router) URLToTraceProfile ¶
URLToTraceProfile constructs a URL to a trace's JSON profile.
func (*Router) URLToTraceSpan ¶
URLToTraceSpan constructs a URL to a sub-span in a trace.