OpenCensus provides in-process web pages that displays collected data from the process. These pages are called zPages and they are useful to see collected data from a specific process without having to depend on any metric collection or distributed tracing backend.

zPages can be useful during the development time or when the process to be inspected is known in production. zPages can also be used to debug exporter issues.

In order to serve zPages, register their handlers and start a web server. Below, there is an example how to serve these pages from

package main

import (

func main() {
    // Using the default serve mux, but you can create your own
    mux := http.DefaultServeMux
    zpages.Handle(mux, "/")
    log.Fatal(http.ListenAndServe("", mux))
// Add the dependencies by following the instructions at
// https://github.com/census-instrumentation/opencensus-java/tree/master/contrib/zpages


Once handler is registered, there are various pages provided from the libraries:


/rpcz serves stats about sent and received RPCs. For example at /rpcz

Available stats include:


/tracez serves details about the trace spans collected in the process. It provides several sample spans per latency bucket and sample errored spans.

An example screenshot from this page is below: